forked from zyra/ionic-super-tabs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomponents.d.ts
260 lines (260 loc) · 10.8 KB
/
components.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
/* eslint-disable */
/* tslint:disable */
/**
* This is an autogenerated file created by the Stencil compiler.
* It contains typing information for all components that exist in this project.
*/
import { HTMLStencilElement, JSXBase } from "@stencil/core/internal";
import { SuperTabChangeEventDetail, SuperTabsConfig } from "./interface";
export namespace Components {
interface SuperTab {
/**
* Returns the root scrollable element
*/
"getRootScrollableEl": () => Promise<HTMLElement | null>;
"loaded": boolean;
/**
* Set this to true to prevent vertical scrolling of this tab. Defaults to `false`. This property will automatically be set to true if there is a direct child element of `ion-content`. To override this behaviour make sure to explicitly set this property to `false`.
*/
"noScroll": boolean;
"visible": boolean;
}
interface SuperTabButton {
"active"?: boolean;
/**
* Whether the button is disabled
*/
"disabled"?: boolean;
"index"?: number;
"scrollableContainer": boolean;
}
interface SuperTabIndicator {
/**
* Toolbar position This determines the position of the indicator
*/
"toolbarPosition": 'top' | 'bottom';
}
interface SuperTabs {
/**
* Initial active tab index. Defaults to `0`.
* @type {number}
*/
"activeTabIndex": number;
/**
* Global Super Tabs configuration. This is the only place you need to configure the components. Any changes to this input will propagate to child components.
* @type {SuperTabsConfig}
*/
"config"?: SuperTabsConfig;
/**
* Set the selected tab. This will move the container and the toolbar to the selected tab.
* @param index the index of the tab you want to select
* @param animate whether you want to animate the transition
* @param emit whether you want to emit tab change event
*/
"selectTab": (index: number, animate?: boolean, emit?: boolean) => Promise<void>;
/**
* Set/update the configuration
* @param config Configuration object
*/
"setConfig": (config: SuperTabsConfig) => Promise<void>;
}
interface SuperTabsContainer {
/**
* Set to true to automatically scroll to the top of the tab when the button is clicked while the tab is already selected.
*/
"autoScrollTop": boolean;
"config"?: SuperTabsConfig;
/**
* @param scrollX
* @param animate
*/
"moveContainer": (scrollX: number, animate?: boolean | undefined) => Promise<void>;
/**
* @param index Index of the tab
* @param animate Whether to animate the transition
*/
"moveContainerByIndex": (index: number, animate?: boolean | undefined) => Promise<void>;
"reindexTabs": () => Promise<void>;
/**
* Scroll the active tab to the top.
*/
"scrollToTop": () => Promise<void>;
"setActiveTabIndex": (index: number, moveContainer?: boolean, animate?: boolean) => Promise<void>;
/**
* Enable/disable swiping
*/
"swipeEnabled": boolean;
}
interface SuperTabsToolbar {
/**
* Background color. Defaults to `'primary'`
*/
"color": string | undefined;
"config"?: SuperTabsConfig;
"moveContainer": (scrollX: number, animate?: boolean | undefined) => Promise<void>;
/**
* Whether the toolbar is scrollable. Defaults to `false`.
*/
"scrollable": boolean;
/**
* If scrollable is set to true, there will be an added padding to the left of the buttons. Setting this property to false will remove that padding. The padding is also configurable via a CSS variable.
*/
"scrollablePadding": boolean;
"setActiveTab": (index: number, align?: boolean | undefined, animate?: boolean | undefined) => Promise<void>;
"setSelectedTab": (index: number, animate?: boolean | undefined) => Promise<void>;
/**
* Whether to show the indicator. Defaults to `true`
*/
"showIndicator": boolean;
}
}
declare global {
interface HTMLSuperTabElement extends Components.SuperTab, HTMLStencilElement {
}
var HTMLSuperTabElement: {
prototype: HTMLSuperTabElement;
new (): HTMLSuperTabElement;
};
interface HTMLSuperTabButtonElement extends Components.SuperTabButton, HTMLStencilElement {
}
var HTMLSuperTabButtonElement: {
prototype: HTMLSuperTabButtonElement;
new (): HTMLSuperTabButtonElement;
};
interface HTMLSuperTabIndicatorElement extends Components.SuperTabIndicator, HTMLStencilElement {
}
var HTMLSuperTabIndicatorElement: {
prototype: HTMLSuperTabIndicatorElement;
new (): HTMLSuperTabIndicatorElement;
};
interface HTMLSuperTabsElement extends Components.SuperTabs, HTMLStencilElement {
}
var HTMLSuperTabsElement: {
prototype: HTMLSuperTabsElement;
new (): HTMLSuperTabsElement;
};
interface HTMLSuperTabsContainerElement extends Components.SuperTabsContainer, HTMLStencilElement {
}
var HTMLSuperTabsContainerElement: {
prototype: HTMLSuperTabsContainerElement;
new (): HTMLSuperTabsContainerElement;
};
interface HTMLSuperTabsToolbarElement extends Components.SuperTabsToolbar, HTMLStencilElement {
}
var HTMLSuperTabsToolbarElement: {
prototype: HTMLSuperTabsToolbarElement;
new (): HTMLSuperTabsToolbarElement;
};
interface HTMLElementTagNameMap {
"super-tab": HTMLSuperTabElement;
"super-tab-button": HTMLSuperTabButtonElement;
"super-tab-indicator": HTMLSuperTabIndicatorElement;
"super-tabs": HTMLSuperTabsElement;
"super-tabs-container": HTMLSuperTabsContainerElement;
"super-tabs-toolbar": HTMLSuperTabsToolbarElement;
}
}
declare namespace LocalJSX {
interface SuperTab {
"loaded"?: boolean;
/**
* Set this to true to prevent vertical scrolling of this tab. Defaults to `false`. This property will automatically be set to true if there is a direct child element of `ion-content`. To override this behaviour make sure to explicitly set this property to `false`.
*/
"noScroll": boolean;
"visible"?: boolean;
}
interface SuperTabButton {
"active"?: boolean;
/**
* Whether the button is disabled
*/
"disabled"?: boolean;
"index"?: number;
"scrollableContainer"?: boolean;
}
interface SuperTabIndicator {
/**
* Toolbar position This determines the position of the indicator
*/
"toolbarPosition"?: 'top' | 'bottom';
}
interface SuperTabs {
/**
* Initial active tab index. Defaults to `0`.
* @type {number}
*/
"activeTabIndex"?: number;
/**
* Global Super Tabs configuration. This is the only place you need to configure the components. Any changes to this input will propagate to child components.
* @type {SuperTabsConfig}
*/
"config"?: SuperTabsConfig;
/**
* Tab change event. This event fires up when a tab button is clicked, or when a user swipes between tabs. The event will fire even if the tab did not change, you can check if the tab changed by checking the `changed` property in the event detail.
*/
"onTabChange"?: (event: CustomEvent<SuperTabChangeEventDetail>) => void;
}
interface SuperTabsContainer {
/**
* Set to true to automatically scroll to the top of the tab when the button is clicked while the tab is already selected.
*/
"autoScrollTop"?: boolean;
"config"?: SuperTabsConfig;
/**
* Emits an event when the active tab changes. An active tab is the tab that the user looking at. This event emitter will not notify you if the user has changed the current active tab. If you need that information, you should use the `tabChange` event emitted by the `super-tabs` element.
*/
"onActiveTabIndexChange"?: (event: CustomEvent<number>) => void;
/**
* Emits events when the container moves. Selected tab index represents what the user should be seeing. If you receive a decimal as the emitted number, it means that the container is moving between tabs. This number is used for animations, and can be used for high tab customizations.
*/
"onSelectedTabIndexChange"?: (event: CustomEvent<number>) => void;
/**
* Enable/disable swiping
*/
"swipeEnabled"?: boolean;
}
interface SuperTabsToolbar {
/**
* Background color. Defaults to `'primary'`
*/
"color"?: string | undefined;
"config"?: SuperTabsConfig;
/**
* Emits an event when a button is clicked Event data contains the clicked SuperTabButton component
*/
"onButtonClick"?: (event: CustomEvent<HTMLSuperTabButtonElement>) => void;
/**
* Whether the toolbar is scrollable. Defaults to `false`.
*/
"scrollable"?: boolean;
/**
* If scrollable is set to true, there will be an added padding to the left of the buttons. Setting this property to false will remove that padding. The padding is also configurable via a CSS variable.
*/
"scrollablePadding"?: boolean;
/**
* Whether to show the indicator. Defaults to `true`
*/
"showIndicator"?: boolean;
}
interface IntrinsicElements {
"super-tab": SuperTab;
"super-tab-button": SuperTabButton;
"super-tab-indicator": SuperTabIndicator;
"super-tabs": SuperTabs;
"super-tabs-container": SuperTabsContainer;
"super-tabs-toolbar": SuperTabsToolbar;
}
}
export { LocalJSX as JSX };
declare module "@stencil/core" {
export namespace JSX {
interface IntrinsicElements {
"super-tab": LocalJSX.SuperTab & JSXBase.HTMLAttributes<HTMLSuperTabElement>;
"super-tab-button": LocalJSX.SuperTabButton & JSXBase.HTMLAttributes<HTMLSuperTabButtonElement>;
"super-tab-indicator": LocalJSX.SuperTabIndicator & JSXBase.HTMLAttributes<HTMLSuperTabIndicatorElement>;
"super-tabs": LocalJSX.SuperTabs & JSXBase.HTMLAttributes<HTMLSuperTabsElement>;
"super-tabs-container": LocalJSX.SuperTabsContainer & JSXBase.HTMLAttributes<HTMLSuperTabsContainerElement>;
"super-tabs-toolbar": LocalJSX.SuperTabsToolbar & JSXBase.HTMLAttributes<HTMLSuperTabsToolbarElement>;
}
}
}