@bigbinary/neetoui 3.5.10 → 3.5.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/formik.d.ts +33 -0
- package/formik.js +3 -3
- package/index.d.ts +534 -0
- package/layouts.d.ts +115 -0
- package/molecules.d.ts +21 -0
- package/package.json +3 -2
package/index.d.ts
ADDED
|
@@ -0,0 +1,534 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export interface AccordionProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
defaultActiveKey?: number;
|
|
6
|
+
padded?: boolean;
|
|
7
|
+
style?: "primary" | "secondary";
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface AccordionItemProps {
|
|
11
|
+
id?: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
isOpen?: boolean;
|
|
14
|
+
onClick?: () => void;
|
|
15
|
+
className?: string;
|
|
16
|
+
titleProps?: React.DetailedHTMLProps<
|
|
17
|
+
React.HTMLAttributes<HTMLDivElement>,
|
|
18
|
+
HTMLDivElement
|
|
19
|
+
>;
|
|
20
|
+
iconProps?: React.SVGProps<SVGSVGElement>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface ColorPickerProps {
|
|
24
|
+
color: string;
|
|
25
|
+
onChange: (color: string) => void;
|
|
26
|
+
colorPaletteProps?: {
|
|
27
|
+
color: { from: string; to: string };
|
|
28
|
+
colorList: { from: string; to: string }[];
|
|
29
|
+
onChange: (from: string, to: string) => void;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface PopupProps {
|
|
34
|
+
isOpen?: boolean;
|
|
35
|
+
onClose?: () => void;
|
|
36
|
+
className?: string;
|
|
37
|
+
closeOnEsc?: boolean;
|
|
38
|
+
closeButton?: boolean;
|
|
39
|
+
backdropClassName?: string;
|
|
40
|
+
closeOnOutsideClick?: boolean;
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
interface PopupContentProps {
|
|
45
|
+
className?: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export type ModalProps = PopupProps & { size?: "xs" | "sm" | "md" };
|
|
49
|
+
|
|
50
|
+
export type PaneProps = PopupProps & { size?: "sm" | "lg" };
|
|
51
|
+
|
|
52
|
+
export interface RadioProps {
|
|
53
|
+
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
54
|
+
label?: string;
|
|
55
|
+
stacked?: boolean;
|
|
56
|
+
className?: string;
|
|
57
|
+
containerClassName?: string;
|
|
58
|
+
error?: string;
|
|
59
|
+
id?: any;
|
|
60
|
+
value?: any;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type RadioItemProps = { label: string } & React.DetailedHTMLProps<
|
|
64
|
+
React.InputHTMLAttributes<HTMLInputElement>,
|
|
65
|
+
HTMLInputElement
|
|
66
|
+
>;
|
|
67
|
+
|
|
68
|
+
export type TabProps = {
|
|
69
|
+
size?: "large" | "default";
|
|
70
|
+
noUnderline?: boolean;
|
|
71
|
+
className?: string;
|
|
72
|
+
} & React.DetailedHTMLProps<
|
|
73
|
+
React.HTMLAttributes<HTMLDivElement>,
|
|
74
|
+
HTMLDivElement
|
|
75
|
+
>;
|
|
76
|
+
|
|
77
|
+
export type TabItemProps<S> = {
|
|
78
|
+
active?: boolean;
|
|
79
|
+
className?: string;
|
|
80
|
+
icon?: string | any;
|
|
81
|
+
onClick?: () => void;
|
|
82
|
+
activeClassName?: string;
|
|
83
|
+
[key: string]: any;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export interface ActionDropdownProps {
|
|
87
|
+
label?: string;
|
|
88
|
+
style?: "primary" | "secondary";
|
|
89
|
+
size?: "large" | "default";
|
|
90
|
+
disabled?: boolean;
|
|
91
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
92
|
+
className?: string;
|
|
93
|
+
buttonProps?: ButtonProps;
|
|
94
|
+
dropdownProps?: DropdownProps;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface AlertProps {
|
|
98
|
+
size?: "xs" | "sm" | "md";
|
|
99
|
+
isOpen?: boolean;
|
|
100
|
+
isSubmitting?: boolean;
|
|
101
|
+
className?: string;
|
|
102
|
+
closeOnEsc?: boolean;
|
|
103
|
+
closeButton?: boolean;
|
|
104
|
+
backdropClassName?: string;
|
|
105
|
+
closeOnOutsideClick?: boolean;
|
|
106
|
+
onClose?: () => void;
|
|
107
|
+
onSubmit?: () => void;
|
|
108
|
+
title?: string;
|
|
109
|
+
message?: string;
|
|
110
|
+
submitButtonLabel?: string;
|
|
111
|
+
cancelButtonLabel?: string;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export type AvatarProps = {
|
|
115
|
+
size?: "small" | "medium" | "large" | "xlarge";
|
|
116
|
+
user?: { name: string; imageUrl: string };
|
|
117
|
+
isSquare?: boolean;
|
|
118
|
+
status?: "online" | "idle" | "offline";
|
|
119
|
+
onClick?: React.MouseEventHandler<HTMLSpanElement>;
|
|
120
|
+
className?: string;
|
|
121
|
+
} & React.DetailedHTMLProps<
|
|
122
|
+
React.HTMLAttributes<HTMLSpanElement>,
|
|
123
|
+
HTMLSpanElement
|
|
124
|
+
>;
|
|
125
|
+
|
|
126
|
+
export interface ButtonProps {
|
|
127
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
128
|
+
icon?: string | any;
|
|
129
|
+
iconPosition?: "left" | "right";
|
|
130
|
+
iconSize?: number;
|
|
131
|
+
label?: string;
|
|
132
|
+
loading?: boolean;
|
|
133
|
+
to?: string;
|
|
134
|
+
type?: "button" | "reset" | "submit";
|
|
135
|
+
style?: "primary" | "secondary" | "danger" | "danger-text" | "text" | "link";
|
|
136
|
+
fullWidth?: boolean;
|
|
137
|
+
className?: string;
|
|
138
|
+
disabled?: boolean;
|
|
139
|
+
size?: "large" | "xlarge" | "default";
|
|
140
|
+
href?: string;
|
|
141
|
+
tooltipProps?: TooltipProps;
|
|
142
|
+
[key: string]: any;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export type CalloutProps = {
|
|
146
|
+
icon?: React.SVGProps<SVGSVGElement>;
|
|
147
|
+
style?: "info" | "warning" | "danger" | "success";
|
|
148
|
+
className?: string;
|
|
149
|
+
} & React.DetailedHTMLProps<
|
|
150
|
+
React.HTMLAttributes<HTMLDivElement>,
|
|
151
|
+
HTMLDivElement
|
|
152
|
+
>;
|
|
153
|
+
|
|
154
|
+
export type CheckboxProps = {
|
|
155
|
+
label?: string;
|
|
156
|
+
error?: string;
|
|
157
|
+
className?: string;
|
|
158
|
+
required?: false;
|
|
159
|
+
id?: string;
|
|
160
|
+
} & React.DetailedHTMLProps<
|
|
161
|
+
React.InputHTMLAttributes<HTMLInputElement>,
|
|
162
|
+
HTMLInputElement
|
|
163
|
+
>;
|
|
164
|
+
|
|
165
|
+
export type DatePickerProps = {
|
|
166
|
+
value: any;
|
|
167
|
+
defaultValue?: any;
|
|
168
|
+
className?: string;
|
|
169
|
+
label?: string;
|
|
170
|
+
size?: "small" | "large";
|
|
171
|
+
dropdownClassName?: string;
|
|
172
|
+
dateFormat?: string;
|
|
173
|
+
timeFormat?: string;
|
|
174
|
+
onChange?: (date: any, dateString: string) => void;
|
|
175
|
+
onOk?: () => void;
|
|
176
|
+
picker?: "date" | "week" | "month" | "quarter" | "year";
|
|
177
|
+
showTime?: boolean;
|
|
178
|
+
type?: "range" | "date";
|
|
179
|
+
nakedInput?: boolean;
|
|
180
|
+
error?: string;
|
|
181
|
+
id?: string;
|
|
182
|
+
disabled?: boolean;
|
|
183
|
+
[key: string]: any;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
export interface DropdownProps {
|
|
187
|
+
icon?: string | any;
|
|
188
|
+
label?: React.ReactNode;
|
|
189
|
+
isOpen?: boolean;
|
|
190
|
+
onClose?: () => void;
|
|
191
|
+
ulProps?: React.DetailedHTMLProps<
|
|
192
|
+
React.HTMLAttributes<HTMLUListElement>,
|
|
193
|
+
HTMLUListElement
|
|
194
|
+
>;
|
|
195
|
+
position?:
|
|
196
|
+
| "auto"
|
|
197
|
+
| "auto-start"
|
|
198
|
+
| "auto-end"
|
|
199
|
+
| "top"
|
|
200
|
+
| "top-start"
|
|
201
|
+
| "top-end"
|
|
202
|
+
| "bottom"
|
|
203
|
+
| "bottom-start"
|
|
204
|
+
| "bottom-end"
|
|
205
|
+
| "right"
|
|
206
|
+
| "right-start"
|
|
207
|
+
| "right-end"
|
|
208
|
+
| "left"
|
|
209
|
+
| "left-start"
|
|
210
|
+
| "left-end";
|
|
211
|
+
className?: string;
|
|
212
|
+
buttonStyle?: "primary" | "secondary" | "text";
|
|
213
|
+
buttonProps?: ButtonProps;
|
|
214
|
+
customTarget?: React.ReactNode | (() => React.ReactNode);
|
|
215
|
+
disabled?: boolean;
|
|
216
|
+
closeOnEsc?: boolean;
|
|
217
|
+
closeOnSelect?: boolean;
|
|
218
|
+
closeOnOutsideClick?: boolean;
|
|
219
|
+
dropdownModifiers?: any[];
|
|
220
|
+
trigger?: "click" | "hover";
|
|
221
|
+
strategy?: "absolute" | "fixed";
|
|
222
|
+
onClick?: () => void;
|
|
223
|
+
[key: string]: any;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export interface EmailInputProps {
|
|
227
|
+
label?: string;
|
|
228
|
+
placeholder?: string;
|
|
229
|
+
helpText?: string;
|
|
230
|
+
value?: { label: string; value: string; valid: boolean }[];
|
|
231
|
+
onChange?: (
|
|
232
|
+
emails: { label: string; value: string; valid: boolean }[]
|
|
233
|
+
) => void;
|
|
234
|
+
error?: string;
|
|
235
|
+
onBlur?: () => void;
|
|
236
|
+
filterInvalidEmails?: { label: string };
|
|
237
|
+
counter?: boolean | { label: string; startFrom: number };
|
|
238
|
+
disabled?: boolean;
|
|
239
|
+
maxHeight?: number;
|
|
240
|
+
[key: string]: any;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export type InputProps = {
|
|
244
|
+
size?: "small" | "large";
|
|
245
|
+
label?: string;
|
|
246
|
+
error?: string;
|
|
247
|
+
suffix?: React.ReactNode;
|
|
248
|
+
prefix?: React.ReactNode;
|
|
249
|
+
disabled?: boolean;
|
|
250
|
+
helpText?: string;
|
|
251
|
+
className?: string;
|
|
252
|
+
nakedInput?: boolean;
|
|
253
|
+
contentSize?: number;
|
|
254
|
+
required?: boolean;
|
|
255
|
+
} & React.DetailedHTMLProps<
|
|
256
|
+
React.InputHTMLAttributes<HTMLInputElement>,
|
|
257
|
+
HTMLInputElement
|
|
258
|
+
>;
|
|
259
|
+
|
|
260
|
+
export type LabelProps = {
|
|
261
|
+
className?: string;
|
|
262
|
+
required?: boolean;
|
|
263
|
+
helpIconProps?: {
|
|
264
|
+
onClick?: () => void;
|
|
265
|
+
icon?: any;
|
|
266
|
+
tooltipProps?: TooltipProps;
|
|
267
|
+
className?: string;
|
|
268
|
+
} & React.SVGProps<SVGSVGElement>;
|
|
269
|
+
} & React.DetailedHTMLProps<
|
|
270
|
+
React.LabelHTMLAttributes<HTMLLabelElement>,
|
|
271
|
+
HTMLLabelElement
|
|
272
|
+
>;
|
|
273
|
+
|
|
274
|
+
export type PageLoaderProps = { text?: string } & React.DetailedHTMLProps<
|
|
275
|
+
React.HTMLAttributes<HTMLDivElement>,
|
|
276
|
+
HTMLDivElement
|
|
277
|
+
>;
|
|
278
|
+
|
|
279
|
+
export interface PaginationProps {
|
|
280
|
+
pageSize: number;
|
|
281
|
+
count: number;
|
|
282
|
+
navigate: (toPage: number) => void;
|
|
283
|
+
pageNo?: number;
|
|
284
|
+
siblingCount?: number;
|
|
285
|
+
className?: string;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export type SelectProps = {
|
|
289
|
+
size?: "small" | "large";
|
|
290
|
+
label?: string;
|
|
291
|
+
required?: boolean;
|
|
292
|
+
error?: string;
|
|
293
|
+
helpText?: string;
|
|
294
|
+
className?: string;
|
|
295
|
+
innerRef?: React.Ref<HTMLSelectElement>;
|
|
296
|
+
isCreateable?: boolean;
|
|
297
|
+
strategy?: "default" | "fixed";
|
|
298
|
+
id?: string;
|
|
299
|
+
loadOptions?: boolean;
|
|
300
|
+
[key: string]: any;
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
export type SpinnerProps = {
|
|
304
|
+
theme?: "dark" | "light";
|
|
305
|
+
className?: string;
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
export type SwitchProps = {
|
|
309
|
+
label?: string;
|
|
310
|
+
required?: boolean;
|
|
311
|
+
className?: string;
|
|
312
|
+
error?: string;
|
|
313
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
314
|
+
checked?: boolean;
|
|
315
|
+
disabled?: boolean;
|
|
316
|
+
} & React.DetailedHTMLProps<
|
|
317
|
+
React.InputHTMLAttributes<HTMLInputElement>,
|
|
318
|
+
HTMLInputElement
|
|
319
|
+
>;
|
|
320
|
+
|
|
321
|
+
export interface TableProps {
|
|
322
|
+
rowData: any[];
|
|
323
|
+
columnData: any[];
|
|
324
|
+
allowRowClick?: boolean;
|
|
325
|
+
className?: string;
|
|
326
|
+
currentPageNumber?: number;
|
|
327
|
+
defaultPageSize?: number;
|
|
328
|
+
handlePageChange?: (page: number, pageSize: number) => void;
|
|
329
|
+
loading?: boolean;
|
|
330
|
+
onRowClick?: (
|
|
331
|
+
event: React.MouseEvent<any, MouseEvent>,
|
|
332
|
+
record: any,
|
|
333
|
+
rowIndex: number
|
|
334
|
+
) => void;
|
|
335
|
+
onRowSelect?: (selectedRowKeys: React.Key[], selectedRows: any[]) => void;
|
|
336
|
+
totalCount?: number;
|
|
337
|
+
selectedRowKeys?: React.Key[];
|
|
338
|
+
fixedHeight?: boolean;
|
|
339
|
+
paginationProps?: any;
|
|
340
|
+
scroll?: {
|
|
341
|
+
x?: string | number | true;
|
|
342
|
+
y?: string | number;
|
|
343
|
+
scrollToFirstRowOnChange?: boolean;
|
|
344
|
+
};
|
|
345
|
+
rowSelection?: any;
|
|
346
|
+
[key: string]: any;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export interface TagProps {
|
|
350
|
+
icon?: string | any;
|
|
351
|
+
size?: "small" | "large";
|
|
352
|
+
label?: string;
|
|
353
|
+
style?: "outline" | "solid";
|
|
354
|
+
onClose?: () => void;
|
|
355
|
+
disabled?: boolean;
|
|
356
|
+
className?: string;
|
|
357
|
+
color?: "green" | "yellow" | "red" | "blue" | "gray";
|
|
358
|
+
indicatorColor?: "green" | "yellow" | "red" | "blue" | "gray";
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
export type TextareaProps = {
|
|
362
|
+
rows?: number;
|
|
363
|
+
disabled?: boolean;
|
|
364
|
+
required?: boolean;
|
|
365
|
+
nakedTextarea?: boolean;
|
|
366
|
+
helpText?: string;
|
|
367
|
+
error?: string;
|
|
368
|
+
label?: string;
|
|
369
|
+
className?: string;
|
|
370
|
+
maxLength?: number;
|
|
371
|
+
} & React.DetailedHTMLProps<
|
|
372
|
+
React.TextareaHTMLAttributes<HTMLTextAreaElement>,
|
|
373
|
+
HTMLTextAreaElement
|
|
374
|
+
>;
|
|
375
|
+
|
|
376
|
+
export type TimePickerProps = {
|
|
377
|
+
className?: string;
|
|
378
|
+
label?: string;
|
|
379
|
+
format?: string;
|
|
380
|
+
size?: "small" | "large";
|
|
381
|
+
interval?: {
|
|
382
|
+
hourStep: number;
|
|
383
|
+
minuteStep: number;
|
|
384
|
+
secondStep: number;
|
|
385
|
+
};
|
|
386
|
+
onChange?: (value: string) => void;
|
|
387
|
+
type?: "time" | "range";
|
|
388
|
+
nakedInput?: boolean;
|
|
389
|
+
disabled?: boolean;
|
|
390
|
+
error?: string;
|
|
391
|
+
defaultValue?: any;
|
|
392
|
+
value?: any;
|
|
393
|
+
id?: string;
|
|
394
|
+
[key: string]: any;
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
export interface TooltipProps {
|
|
398
|
+
content: React.ReactNode;
|
|
399
|
+
theme?: "dark" | "light";
|
|
400
|
+
disabled?: boolean;
|
|
401
|
+
position?:
|
|
402
|
+
| "auto"
|
|
403
|
+
| "auto-start"
|
|
404
|
+
| "auto-end"
|
|
405
|
+
| "top"
|
|
406
|
+
| "bottom"
|
|
407
|
+
| "right"
|
|
408
|
+
| "left"
|
|
409
|
+
| "auto"
|
|
410
|
+
| "top-start"
|
|
411
|
+
| "top-end"
|
|
412
|
+
| "bottom-start"
|
|
413
|
+
| "bottom-end"
|
|
414
|
+
| "right-start"
|
|
415
|
+
| "right-end"
|
|
416
|
+
| "left-start"
|
|
417
|
+
| "left-end";
|
|
418
|
+
interactive?: boolean;
|
|
419
|
+
hideAfter?: number;
|
|
420
|
+
hideOnTargetExit?: boolean;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
export type TypographyProps = {
|
|
424
|
+
style?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "body1" | "body2" | "body3";
|
|
425
|
+
weight?:
|
|
426
|
+
| "thin"
|
|
427
|
+
| "extralight"
|
|
428
|
+
| "light"
|
|
429
|
+
| "normal"
|
|
430
|
+
| "medium"
|
|
431
|
+
| "semibold"
|
|
432
|
+
| "bold"
|
|
433
|
+
| "extrabold"
|
|
434
|
+
| "black";
|
|
435
|
+
lineHeight?: "none" | "tight" | "snug" | "normal" | "relaxed" | "loose";
|
|
436
|
+
component?:
|
|
437
|
+
| "h1"
|
|
438
|
+
| "h2"
|
|
439
|
+
| "h3"
|
|
440
|
+
| "h4"
|
|
441
|
+
| "h5"
|
|
442
|
+
| "h6"
|
|
443
|
+
| "p"
|
|
444
|
+
| "span"
|
|
445
|
+
| "b"
|
|
446
|
+
| "strong"
|
|
447
|
+
| "i"
|
|
448
|
+
| "em"
|
|
449
|
+
| "mark"
|
|
450
|
+
| "del"
|
|
451
|
+
| "s"
|
|
452
|
+
| "ins"
|
|
453
|
+
| "sub"
|
|
454
|
+
| "sup"
|
|
455
|
+
| "u"
|
|
456
|
+
| "code"
|
|
457
|
+
| "blockquote";
|
|
458
|
+
textTransform?:
|
|
459
|
+
| "none"
|
|
460
|
+
| "capitalize"
|
|
461
|
+
| "uppercase"
|
|
462
|
+
| "lowercase"
|
|
463
|
+
| "fullwidth"
|
|
464
|
+
| "inherit"
|
|
465
|
+
| "initial"
|
|
466
|
+
| "revert"
|
|
467
|
+
| "unset";
|
|
468
|
+
className?: string;
|
|
469
|
+
} & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
470
|
+
|
|
471
|
+
// components
|
|
472
|
+
|
|
473
|
+
export const Accordion: React.FC<AccordionProps> & {
|
|
474
|
+
Item: React.FC<AccordionItemProps>;
|
|
475
|
+
};
|
|
476
|
+
export const Modal: React.FC<ModalProps> & {
|
|
477
|
+
Header: React.FC<PopupContentProps>;
|
|
478
|
+
Body: React.FC<PopupContentProps>;
|
|
479
|
+
Footer: React.FC<PopupContentProps>;
|
|
480
|
+
};
|
|
481
|
+
export const Pane: React.FC<PaneProps> & {
|
|
482
|
+
Header: React.FC<PopupContentProps>;
|
|
483
|
+
Body: React.FC<PopupContentProps & { hasFooter?: boolean }>;
|
|
484
|
+
Footer: React.FC<PopupContentProps>;
|
|
485
|
+
};
|
|
486
|
+
export const Radio: React.FC<RadioProps> & {
|
|
487
|
+
Item: React.FC<RadioItemProps>;
|
|
488
|
+
};
|
|
489
|
+
export const Tab: React.FC<TabProps> & {
|
|
490
|
+
Item: React.FC<TabItemProps<any>>;
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
type ToastrFunction = (
|
|
494
|
+
message: React.ReactNode,
|
|
495
|
+
buttonLabel: React.ReactNode,
|
|
496
|
+
onClick: () => void
|
|
497
|
+
) => void;
|
|
498
|
+
|
|
499
|
+
export const Toastr: {
|
|
500
|
+
show: ToastrFunction;
|
|
501
|
+
info: ToastrFunction;
|
|
502
|
+
success: ToastrFunction;
|
|
503
|
+
error: (
|
|
504
|
+
message: React.ReactNode | Error,
|
|
505
|
+
buttonLabel: React.ReactNode,
|
|
506
|
+
onClick: () => void
|
|
507
|
+
) => void;
|
|
508
|
+
warning: ToastrFunction;
|
|
509
|
+
};
|
|
510
|
+
|
|
511
|
+
export const ColorPicker: React.FC<ColorPickerProps>;
|
|
512
|
+
|
|
513
|
+
export const ActionDropdown: React.FC<ActionDropdownProps>;
|
|
514
|
+
export const Alert: React.FC<AlertProps>;
|
|
515
|
+
export const Avatar: React.FC<AvatarProps>;
|
|
516
|
+
export const Button: React.FC<ButtonProps>;
|
|
517
|
+
export const Callout: React.FC<CalloutProps>;
|
|
518
|
+
export const Checkbox: React.FC<CheckboxProps>;
|
|
519
|
+
export const DatePicker: React.FC<DatePickerProps>;
|
|
520
|
+
export const Dropdown: React.FC<DropdownProps>;
|
|
521
|
+
export const EmailInput: React.FC<EmailInputProps>;
|
|
522
|
+
export const Input: React.ForwardRefExoticComponent<InputProps>;
|
|
523
|
+
export const Label: React.FC<LabelProps>;
|
|
524
|
+
export const PageLoader: React.FC<PageLoaderProps>;
|
|
525
|
+
export const Pagination: React.FC<PaginationProps>;
|
|
526
|
+
export const Select: React.ForwardRefExoticComponent<SelectProps>;
|
|
527
|
+
export const Spinner: React.FC<SpinnerProps>;
|
|
528
|
+
export const Switch: React.ForwardRefExoticComponent<SwitchProps>;
|
|
529
|
+
export const Table: React.FC<TableProps>;
|
|
530
|
+
export const Tag: React.FC<TagProps>;
|
|
531
|
+
export const Textarea: React.ForwardRefExoticComponent<TextareaProps>;
|
|
532
|
+
export const TimePicker: React.FC<TimePickerProps>;
|
|
533
|
+
export const Typography: React.ForwardRefExoticComponent<TypographyProps>;
|
|
534
|
+
export const Tooltip: React.ForwardRefExoticComponent<TooltipProps>;
|
package/layouts.d.ts
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { NavLinkProps } from "react-router-dom";
|
|
3
|
+
import { AvatarProps, InputProps } from "./index";
|
|
4
|
+
|
|
5
|
+
export interface AppSwitcherProps {
|
|
6
|
+
size?: "lg" | "sm";
|
|
7
|
+
isOpen?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
closeOnEsc?: boolean;
|
|
10
|
+
closeOnOutsideClick?: boolean;
|
|
11
|
+
environment?: "development" | "staging" | "production";
|
|
12
|
+
activeApp?: string;
|
|
13
|
+
subdomain?: string;
|
|
14
|
+
neetoApps?: string[];
|
|
15
|
+
recentApps?: string[];
|
|
16
|
+
isSidebarOpen?: boolean;
|
|
17
|
+
onClose?: () => void;
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ContainerProps {
|
|
22
|
+
isHeaderFixed?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface HeaderProps {
|
|
26
|
+
title?: React.ReactNode;
|
|
27
|
+
menuBarToggle?: () => void;
|
|
28
|
+
searchProps?: InputProps;
|
|
29
|
+
className?: string;
|
|
30
|
+
actionBlock?: React.ReactNode;
|
|
31
|
+
breadcrumbs?: { text: React.ReactNode; link: string }[];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface MenuBarProps {
|
|
35
|
+
title?: string;
|
|
36
|
+
className?: string;
|
|
37
|
+
showMenu?: boolean;
|
|
38
|
+
"data-cy"?: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type ScrollableProps = {
|
|
42
|
+
className?: string;
|
|
43
|
+
size?: "small" | "large" | "viewport";
|
|
44
|
+
} & React.DetailedHTMLProps<
|
|
45
|
+
React.HTMLAttributes<HTMLDivElement>,
|
|
46
|
+
HTMLDivElement
|
|
47
|
+
>;
|
|
48
|
+
|
|
49
|
+
type NavLinkItemType = {
|
|
50
|
+
to: string;
|
|
51
|
+
label?: React.ReactNode;
|
|
52
|
+
icon?: any;
|
|
53
|
+
description?: React.ReactNode;
|
|
54
|
+
} & React.PropsWithoutRef<NavLinkProps<any>> &
|
|
55
|
+
React.RefAttributes<HTMLAnchorElement>;
|
|
56
|
+
|
|
57
|
+
type FooterLinkType = {
|
|
58
|
+
label?: React.ReactNode;
|
|
59
|
+
icon?: any;
|
|
60
|
+
href?: string;
|
|
61
|
+
to?: string;
|
|
62
|
+
} & React.DetailedHTMLProps<
|
|
63
|
+
React.AnchorHTMLAttributes<HTMLAnchorElement>,
|
|
64
|
+
HTMLAnchorElement
|
|
65
|
+
> &
|
|
66
|
+
React.PropsWithoutRef<NavLinkProps<any>> &
|
|
67
|
+
React.RefAttributes<HTMLAnchorElement>;
|
|
68
|
+
|
|
69
|
+
type LinkType = {
|
|
70
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
71
|
+
label: React.ReactNode;
|
|
72
|
+
icon?: any;
|
|
73
|
+
} & React.DetailedHTMLProps<
|
|
74
|
+
React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
75
|
+
HTMLButtonElement
|
|
76
|
+
>;
|
|
77
|
+
|
|
78
|
+
export interface SidebarProps {
|
|
79
|
+
organizationInfo?: {
|
|
80
|
+
logo?: React.ReactNode;
|
|
81
|
+
name?: React.ReactNode;
|
|
82
|
+
subdomain?: React.ReactNode;
|
|
83
|
+
};
|
|
84
|
+
navLinks?: NavLinkItemType[];
|
|
85
|
+
tooltipStyle?: "default" | "featured";
|
|
86
|
+
footerLinks?: FooterLinkType[];
|
|
87
|
+
profileInfo?: {
|
|
88
|
+
name?: string;
|
|
89
|
+
email?: string;
|
|
90
|
+
topLinks?: LinkType[];
|
|
91
|
+
bottomLinks?: LinkType[];
|
|
92
|
+
customContent?: React.ReactNode;
|
|
93
|
+
changelogProps?: LinkType;
|
|
94
|
+
helpProps?: LinkType;
|
|
95
|
+
"data-cy"?: string;
|
|
96
|
+
} & AvatarProps;
|
|
97
|
+
isCollapsed?: boolean;
|
|
98
|
+
showAppSwitcher?: boolean;
|
|
99
|
+
onAppSwitcherToggle?: React.MouseEventHandler<HTMLButtonElement>;
|
|
100
|
+
appName?: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface SubHeaderProps {
|
|
104
|
+
className?: string;
|
|
105
|
+
leftActionBlock?: React.ReactNode;
|
|
106
|
+
rightActionBlock?: React.ReactNode;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export const AppSwitcher: React.FC<AppSwitcherProps>;
|
|
110
|
+
export const Container: React.ForwardRefExoticComponent<ContainerProps>;
|
|
111
|
+
export const Header: React.FC<HeaderProps>;
|
|
112
|
+
export const MenuBar: React.FC<MenuBarProps>;
|
|
113
|
+
export const Scrollable: React.FC<ScrollableProps>;
|
|
114
|
+
export const Sidebar: React.FC<SidebarProps>;
|
|
115
|
+
export const SubHeader: React.FC<SubHeaderProps>;
|
package/molecules.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ButtonProps, SelectProps, TagProps } from "./index";
|
|
3
|
+
|
|
4
|
+
interface Option {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface TagsProps {
|
|
10
|
+
label?: string;
|
|
11
|
+
allTags?: Option[];
|
|
12
|
+
selectedTags?: Option[];
|
|
13
|
+
onTagSelect?: (e: any) => void;
|
|
14
|
+
onTagCreate?: (e: any) => void;
|
|
15
|
+
onTagDelete?: (e: any) => void;
|
|
16
|
+
tagProps?: TagProps;
|
|
17
|
+
selectProps?: SelectProps;
|
|
18
|
+
buttonProps?: ButtonProps;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const Tags: React.FC<TagsProps>;
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neetoui",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.13",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"module": "./index.js",
|
|
6
|
+
"types": "./index.d.ts",
|
|
6
7
|
"author": "BigBinary",
|
|
7
8
|
"license": "MIT",
|
|
8
9
|
"description": "neetoUI is the library that drives the experience in all neeto products built at BigBinary",
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
43
|
"@babel/core": "7.11.6",
|
|
44
|
+
"@babel/eslint-parser": "^7.18.9",
|
|
43
45
|
"@babel/plugin-transform-runtime": "7.17.0",
|
|
44
46
|
"@babel/preset-env": "7.14.7",
|
|
45
47
|
"@babel/preset-react": "7.14.5",
|
|
@@ -61,7 +63,6 @@
|
|
|
61
63
|
"@testing-library/react": "12.1.3",
|
|
62
64
|
"@testing-library/user-event": "13.5.0",
|
|
63
65
|
"autoprefixer": "9.0.0",
|
|
64
|
-
"babel-eslint": "10.1.0",
|
|
65
66
|
"babel-jest": "27.3.1",
|
|
66
67
|
"babel-loader": "8.1.0",
|
|
67
68
|
"chromatic": "6.5.1",
|