-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.d.ts
296 lines (264 loc) · 8.3 KB
/
index.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
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
/** Declaration file generated by dts-gen */
import * as React from "react";
/*~ You can declare types that are available via importing the module */
export interface PaginationProps {
changePage: (page: number) => void,
totalItems: number,
currentPage?: number,
pageSize?: number,
resultsText?: boolean | JSX.Element,
limitSelector?: boolean,
changeLimit?: (limit: number) => void,
goToPage?: boolean
}
interface tooltipWrapperControlledProps {
isControlled?: boolean,
showTooltip?: (bool: boolean) => void,
closeTooltip?: (bool: boolean) => void,
isVisible?: boolean
}
interface tooltipWrapperOffsetAdjustmentsProps {
top?: number,
right?: number,
left?: number
}
export interface TooltipWrapperProps {
className?: string,
children?: JSX.Element,
tooltipComponent?: JSX.Element,
left?: boolean,
wide?: boolean,
icon?: string,
controlledProps?: tooltipWrapperControlledProps,
offsetAdjustments?: tooltipWrapperOffsetAdjustmentsProps,
styles?: any
}
export interface QuarterPickerProps {
handleSelection: (quarter: number) => void,
selectedQuarters: Array<string>,
disabledQuarters: Array<string>,
selectedPeriods: Array<string>,
disabledPeriods: Array<string>,
periodsPerQuarter: Array<[object]>,
isCumulative: boolean,
showPeriods: boolean
}
interface LoadingMessageProps {
loadingText: string
}
interface PickerPropsOptions {
name: string | number,
value: string | number,
onClick: (value: string | number) => void,
classNames?: string
}
export interface PickerProps {
sortFn: (a:any, b:any) => Array<any>,
icon: JSX.Element,
selectedOption: string,
className: string,
id: string,
options: PickerPropsOptions,
dropdownDirection: string,
isFixedWidth: boolean,
children: Array<JSX.Element> | JSX.Element,
backgroundColor: string
}
interface SearchBarProps {
onSearch: (value: string) => void,
minChars: number,
isDisabled: boolean,
throttleOnChange: number,
inputTitle: string,
placeholder: string
}
interface TabsProps {
types: Array<[object]>,
active: string,
switchTab: (value: string) => void,
tabsClassName: string,
tablessStyle: boolean
}
interface TooltipComponentTextAlign {
title?: string,
text?: string
}
export interface TooltipComponentProps {
title: string,
children: Array<JSX.Element> | JSX.Element,
className: string,
textAlign: TooltipComponentTextAlign
}
interface tableCurrentSortProps {
direction: string,
field: string
}
export interface TableProps {
columns: Array<Object>,
rows: Array<Object|[]>,
currentSort: tableCurrentSortProps,
updateSort: (title: string, direction: string) => void,
expandable: boolean,
divider: string,
classNames: string
}
export interface GenericMessageProps {
title: string,
description: string,
icon: object,
className: string
}
export interface SectionWrapperProps {
children: JSX.Element,
defaultExpandedState: boolean,
overLine: string,
controlledProps: object,
description: JSX.Element,
titleTooltip: object,
descTooltip: object,
isCollapsible: boolean,
isComingSoon: boolean,
classNames: string,
id: string,
title: string,
icon: JSX.Element,
className: string
}
export interface SectionHeaderProps {
icon: JSX.Element,
title: string,
overLine: string,
description: JSX.Element,
titleTooltip: object,
descToolTip: object
}
export interface CarouselProps {
items: Array<JSX.Element>
}
export interface InformationBoxesProps {
boxes: Array<Object>
}
export interface ErrorMessageProps {
description: string
}
export interface DownloadIconButtonProps {
onClick: () => void,
downloadInFlight: boolean,
hoverComponent: JSX.Element
}
interface FiscalYearOptions {
name: string | number,
value: string | number
}
export interface FiscalYearPickerProps {
backgroundColor: string,
selectedFy: number | string,
latestFy: number,
earliestFy: number,
handleFyChange: (fy: string) => void,
options: Array<FiscalYearOptions>,
sortFn: (a: string | number, b: string | number) => number;
}
export interface ShareIconProps {
url: string,
classNames: string,
onShareOptionClick: (name: string) => void,
includeDropdownOptions: Array<string>
}
export interface PageHeaderProps {
title: string,
overLine: string,
stickyBreakPoint: number,
toolBar: Array<JSX.Element>
}
export interface FlexGridContainerProps {
children: JSX.Element,
className: string
}
export interface FlexGridRowProps {
children: JSX.Element,
className: string,
hasGutter: boolean,
gutterSize: "sm" | "lg"
}
export interface FlexGridColProps {
children: JSX.Element,
className: string,
desktop: number | "auto" | "fill" | object,
tablet: number | "auto" | "fill" | object,
mobile: number | "auto" | "fill" | object,
width: number | "auto" | "fill" | object
}
export interface CardContainerProps {
children: JSX.Element,
className: string | object,
variant: "elevated" | "outline",
size: "sm" | "md" | "lg",
fill: string,
height: string | number
}
export interface FlexGridColProps {
children: JSX.Element,
className: string,
desktop: number | "auto" | "fill" | object,
tablet: number | "auto" | "fill" | object,
mobile: number | "auto" | "fill" | object,
width: number | "auto" | "fill" | object
}
export interface ButtonProps {
buttonSize: "large" | "medium" | "small" | "lg" | "md" | "sm",
backgroundColor: "light" | "dark",
buttonType: "primary" | "primaryIcon" | "secondary" | "secondaryIcon" | "tertiary" | "tertiaryIcon" | "text" | "stacked" | "icon" | "inline" | "intext",
copy: string,
image: JSX.Element,
textAlignment: "left" | "center",
imageAlignment: "left" | "right",
additionalClassnames: string,
onClick: () => void,
onKeyUp: () => void,
buttonTitle: string,
disabled: boolean,
maxWidth: string,
to: string
}
/*~ If this module has methods, declare them as functions like so.
*/
export class Pagination extends React.Component<PaginationProps>{}
export class TooltipWrapper extends React.Component<TooltipWrapperProps>{}
export class QuarterPicker extends React.Component<QuarterPickerProps>{}
export function Picker(props: PickerProps): JSX.Element;
export function SearchBar(props: SearchBarProps): JSX.Element;
export function Tabs(props: TabsProps): JSX.Element;
export function TooltipComponent(props: TooltipComponentProps): JSX.Element;
export function Table(props: TableProps): JSX.Element;
export function GenericMessage(props: GenericMessageProps): JSX.Element;
export function LoadingMessage(props: LoadingMessageProps): JSX.Element;
export function ErrorMessage(props: ErrorMessageProps): JSX.Element;
export function SectionWrapper(props: SectionWrapperProps): JSX.Element;
export function SectionHeader(props: SectionHeaderProps): JSX.Element;
export function PageHeader(props: PageHeaderProps): JSX.Element;
export function FlexGridContainer(props: FlexGridContainerProps): JSX.Element;
export function FlexGridRow(props: FlexGridRowProps): JSX.Element;
export function FlexGridCol(props: FlexGridColProps): JSX.Element;
export function DownloadIconButton(props: DownloadIconButtonProps): JSX.Element;
export function FiscalYearPicker(props: FiscalYearPickerProps): JSX.Element;
export function ShareIcon(props: ShareIconProps): JSX.Element;
export function CardContainer(props: CardContainerProps): JSX.Element;
export function Button(props: ButtonProps): JSX.Element;
export function useCumulativeQuarterPicker(initialState: Array<string>): [Array<string>, () => void]
export function useDynamicStickyClass(ref: object, fixedStickyBreakPoint: number): [boolean, number, () => void, () => void, () => void]
/*~ If there are types, properties, or methods inside dotted names
*~ of the module, declare them inside a "namespace".
*/
// export namespace Helpers {
// /*~ For example, given this definition, someone could write:
// *~ import { subProp } from "yourModule";
// *~ subProp.foo();
// *~ or
// *~ import * as yourMod from "yourModule";
// *~ yourMod.subProp.foo();
// */
// namespace MoneyFormatter {
// function foo(): void;
// }
// }