vrfi-design-system 1.0.1 → 1.0.3

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/dist/index.d.ts CHANGED
@@ -1,11 +1,322 @@
1
+ import { BaseOptionType } from 'rc-select/lib/Select';
2
+ import { ButtonType } from 'antd/lib/button';
3
+ import { CheckboxChangeEvent } from 'antd/es/checkbox';
4
+ import { CheckboxGroupProps } from 'antd/es/checkbox';
5
+ import { CheckboxOptionType } from 'antd/lib/checkbox/Group';
6
+ import { ComponentProps } from 'react';
7
+ import { DatePickerProps as DatePickerProps_2 } from 'antd';
8
+ import { default as default_2 } from 'react';
9
+ import { default as default_3 } from 'dayjs';
10
+ import { DefaultOptionType } from 'rc-select/lib/Select';
11
+ import { DrawerProps as DrawerProps_2 } from 'antd';
1
12
  import { FC } from 'react';
13
+ import { FilterValue } from 'antd/lib/table/interface';
14
+ import { InputProps } from 'antd/lib';
15
+ import { JSX as JSX_2 } from 'react';
16
+ import { LoaderSizes } from '../../../enums/LoaderSizes';
17
+ import { ModalProps as ModalProps_2 } from 'antd/lib/modal';
18
+ import { MouseEvent as MouseEvent_2 } from 'react';
19
+ import { PasswordProps } from 'antd/es/input';
20
+ import { Radio as Radio_2 } from 'antd';
21
+ import { RadioButtonProps as RadioButtonProps_2 } from 'antd/es/radio/radioButton';
22
+ import { ReactElement } from 'react';
23
+ import { ReactNode } from 'react';
24
+ import { SelectProps } from 'antd';
25
+ import { SizeType } from 'antd/lib/config-provider/SizeContext';
26
+ import { SkeletonProps } from 'antd';
27
+ import { SorterResult } from 'antd/lib/table/interface';
28
+ import { StepProps } from 'antd';
29
+ import { StepsProps } from 'antd';
30
+ import { TableCurrentDataSource } from 'antd/lib/table/interface';
31
+ import { TablePaginationConfig } from 'antd';
32
+ import { TableProps } from 'antd/lib/table';
33
+ import { TableProps as TableProps_2 } from 'rc-table/lib/Table';
34
+ import { TableProps as TableProps_3 } from 'antd';
35
+ import { TextAreaProps } from 'antd/lib/input';
36
+ import { tooltipPosition } from '../../../enums/tooltipPosition';
37
+ import { UploadFile } from 'antd/lib/upload/interface';
2
38
 
3
- export declare const InputField: FC<InputFieldProps>;
39
+ export declare interface AvatarCardProps {
40
+ name: string;
41
+ backgroundUrl?: string;
42
+ email: string;
43
+ }
4
44
 
5
- export declare interface InputFieldProps {
6
- type: string;
45
+ export declare interface AvatarProps {
46
+ names: string[];
47
+ }
48
+
49
+ declare const enum AvatarSize {
50
+ SMALL = "small",
51
+ LARGE = "large"
52
+ }
53
+
54
+ export declare function AvatarWithDetailsCard(props: AvatarCardProps): default_2.JSX.Element;
55
+
56
+ export declare const AvatarWithInitials: ({ names }: AvatarProps) => default_2.JSX.Element;
57
+
58
+ export declare const Button: FC<ButtonProps>;
59
+
60
+ export declare interface ButtonProps {
61
+ clickHandler?: (event: MouseEvent_2) => void;
62
+ children: ReactNode;
63
+ htmlType?: "reset" | "submit" | "button";
64
+ type?: ButtonType;
65
+ className?: string;
66
+ moduleClassName?: string;
67
+ icon?: any;
68
+ disabled?: boolean;
69
+ size?: "small" | "medium";
70
+ loading?: boolean;
71
+ name?: string;
72
+ target?: string;
73
+ href?: string;
74
+ }
75
+
76
+ export declare const Checkbox: ({ children, group, options, disabled, indeterminate, defaultChecked, onChange, checked, }: CheckboxProps) => default_2.JSX.Element;
77
+
78
+ export declare interface CheckboxProps {
79
+ children?: default_2.ReactNode;
80
+ disabled?: boolean;
81
+ indeterminate?: boolean;
82
+ defaultChecked?: boolean;
83
+ group?: boolean;
84
+ onChange: (event: CheckboxChangeEvent | CheckboxGroupProps[]) => void;
85
+ options?: (CheckboxOptionType | string | number)[];
86
+ checked?: boolean;
87
+ }
88
+
89
+ export declare const CustomAvatar: ({ name, size, imageUrl, isExtra }: CustomAvatarProps) => default_2.JSX.Element;
90
+
91
+ export declare type CustomAvatarProps = {
92
+ name?: string;
93
+ size: AvatarSize;
94
+ imageUrl?: string;
95
+ isExtra?: boolean;
96
+ };
97
+
98
+ export declare interface CustomInputProps {
99
+ label: string;
100
+ control?: any;
7
101
  name: string;
102
+ rules?: Record<string, any>;
8
103
  placeholder: string;
104
+ type: string;
105
+ error: string;
106
+ hasError: boolean;
107
+ customOnChange: (event: default_2.ChangeEvent<HTMLInputElement | HTMLTextAreaElement> | default_3.Dayjs | null, field: any) => void;
108
+ }
109
+
110
+ export declare const DatePickerField: {
111
+ ({ title, ...props }: DatePickerProps & DatePickerProps_2): default_2.JSX.Element;
112
+ Formik: (props: DatePickerProps & DatePickerProps_2) => default_2.JSX.Element;
113
+ };
114
+
115
+ export declare interface DatePickerProps {
116
+ name: string;
117
+ title?: string;
118
+ }
119
+
120
+ export declare function DocumentStatus(props: DocumentStatusTypes): default_2.JSX.Element;
121
+
122
+ declare enum DocumentStatusEnum {
123
+ PENDING = "Pending",
124
+ UPLOADED = "Uploaded"
125
+ }
126
+
127
+ export declare type DocumentStatusTypes = {
128
+ DocumentType: DocumentStatusEnum;
129
+ };
130
+
131
+ export declare const Drawer: FC<DrawerProps>;
132
+
133
+ export declare interface DrawerProps {
134
+ title: ReactNode;
135
+ width?: number;
136
+ closable: boolean;
137
+ onClose: () => void;
138
+ open: boolean;
139
+ closeIcon?: ReactNode;
140
+ footer?: ReactNode;
141
+ size?: DrawerProps_2["size"];
142
+ zIndex?: number;
143
+ children: JSX_2.Element;
144
+ placement?: 'top' | 'bottom' | 'left' | 'right';
145
+ }
146
+
147
+ declare const Dropdown: <ValueType, OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType>({ title, ...props }: DropdownProps<ValueType, OptionType>) => default_2.JSX.Element;
148
+
149
+ export declare const DropdownField: (props: FormDropdown) => default_2.JSX.Element;
150
+
151
+ export declare interface DropdownProps<ValueType, OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType> extends SelectProps<ValueType, OptionType> {
152
+ name: string;
153
+ title?: string;
154
+ }
155
+
156
+ declare const Error_2: FC<ErrorMessageProps>;
157
+ export { Error_2 as Error }
158
+
159
+ export declare interface ErrorMessageProps {
160
+ message: string;
161
+ }
162
+
163
+ export declare const FileUpload: ({ children, actionURL, dragdrop, uploadIcon, uploadText, uploadHint, fileTypes, multiple, maxCount, handleChange, supportedFileType }: FileUploadProps) => default_2.JSX.Element;
164
+
165
+ export declare interface FileUploadProps {
166
+ children?: default_2.ReactNode;
167
+ dragdrop?: boolean;
168
+ uploadIcon?: ReactNode;
169
+ uploadText?: ReactNode;
170
+ uploadHint?: ReactNode;
171
+ fileTypes?: string;
172
+ actionURL?: string;
173
+ multiple?: boolean;
174
+ maxCount?: number;
175
+ supportedFileType?: string;
176
+ handleChange: (file: FileList | UploadFile) => void;
177
+ }
178
+
179
+ export declare const FloatingLabel: (props: FloatingLabelProps) => default_2.JSX.Element;
180
+
181
+ export declare interface FloatingLabelProps {
182
+ children: ReactNode;
183
+ label?: string;
184
+ value: string;
185
+ }
186
+
187
+ declare interface FormDropdown extends Omit<ComponentProps<typeof Dropdown>, "onChange"> {
188
+ control: any;
189
+ rules: any;
190
+ name: string;
191
+ hasError: boolean;
192
+ type: string;
193
+ error: string;
194
+ customOnChange: (event: default_2.ChangeEvent<HTMLInputElement>, field: any) => void;
195
+ }
196
+
197
+ export declare interface INotification {
198
+ message: string;
199
+ description: string;
200
+ type: string;
201
+ }
202
+
203
+ export declare const InputField: {
204
+ ({ label, type, placeholder, hasError, ...rest }: CustomInputProps & InputProps): default_2.JSX.Element;
205
+ password: ({ label, type, placeholder, hasError, ...rest }: CustomInputProps & PasswordProps) => default_2.JSX.Element;
206
+ TextArea: ({ label, type, placeholder, hasError, ...rest }: CustomInputProps & TextAreaProps) => default_2.JSX.Element;
207
+ DatePicker: (props: CustomInputProps & DatePickerProps_2 & DatePickerProps_2) => default_2.JSX.Element;
208
+ Radio: (props: CustomInputProps & RadioProps_2) => default_2.JSX.Element;
209
+ };
210
+
211
+ export declare const Loader: default_2.FC<LoaderProps>;
212
+
213
+ export declare interface LoaderProps {
214
+ icon?: ReactElement;
215
+ size?: LoaderSizes.SMALL | LoaderSizes.LARGE | LoaderSizes.DEFAULT;
216
+ tip?: string;
217
+ }
218
+
219
+ export declare const Modal: default_2.FC<ModalProps>;
220
+
221
+ export declare interface ModalProps extends ModalProps_2 {
222
+ children?: default_2.ReactNode;
223
+ onClose: () => void;
224
+ onOK?: () => void;
225
+ visible: boolean;
226
+ width?: number;
227
+ title?: string;
228
+ footer?: JSX_2.Element[];
229
+ confirmLoading?: boolean;
230
+ modalType: ModalTypeEnum;
231
+ }
232
+
233
+ declare enum ModalTypeEnum {
234
+ SUCCESS = "success",
235
+ DANGER = "danger",
236
+ BASIC = "basic"
237
+ }
238
+
239
+ declare const Notification_2: ({ message, description, type }: INotification) => unknown;
240
+ export { Notification_2 as Notification }
241
+
242
+ export declare const Offline: ({ isOffline }: OfflineProps) => default_2.JSX.Element | null;
243
+
244
+ export declare interface OfflineProps {
245
+ isOffline: boolean;
246
+ }
247
+
248
+ export declare const Radio: ({ label, ...props }: RadioProps) => default_2.JSX.Element;
249
+
250
+ declare interface RadioButtonProps {
251
+ label?: string;
252
+ }
253
+
254
+ export declare type RadioProps = RadioButtonProps & ComponentProps<typeof Radio_2.Group>;
255
+
256
+ declare type RadioProps_2 = RadioButtonProps_2 & ComponentProps<typeof Radio_2.Group>;
257
+
258
+ export declare interface SearchComponentProps {
259
+ onChange: (event: default_2.ChangeEvent<HTMLInputElement>) => void;
260
+ searchValue: string;
261
+ }
262
+
263
+ export declare const SearchField: FC<SearchComponentProps>;
264
+
265
+ export declare const Skeleton: FC<SkeletonProps>;
266
+
267
+ declare interface StepItem extends StepProps {
268
+ component?: default_2.ReactElement;
269
+ }
270
+
271
+ export declare const Stepper: FC<StepperProps>;
272
+
273
+ export declare interface StepperProps extends StepsProps {
274
+ items: StepItem[];
275
+ title?: string;
276
+ destroyOnChange?: boolean;
277
+ }
278
+
279
+ export declare const Table: <T extends object>({ pagination, ...props }: TableProps_3<T>) => default_2.JSX.Element;
280
+
281
+ export declare const TableComponent: FC<TableComponentProps>;
282
+
283
+ export declare interface TableComponentProps extends TableProps<any> {
284
+ className?: string;
285
+ dataSource: any[] | undefined;
286
+ pagination?: false | TablePaginationConfig | undefined;
287
+ loading?: boolean;
288
+ onRow?: any;
289
+ rowClassName?: (record: any) => string;
290
+ scroll?: TableProps_2<any>['scroll'] & {
291
+ scrollToFirstRowOnChange?: boolean;
292
+ };
293
+ onChange?: (pagination?: TablePaginationConfig, filters?: Record<string, FilterValue | null>, sorter?: SorterResult<any> | SorterResult<any>[], extra?: TableCurrentDataSource<any>) => void;
294
+ loadingCount?: number;
295
+ size?: SizeType;
296
+ }
297
+
298
+ export declare const Tooltip: FC<TooltipProps>;
299
+
300
+ declare interface TooltipProps {
301
+ title: string;
302
+ arrowPointAtCenter?: boolean;
303
+ autoAdjustOverflow?: boolean;
304
+ placement?: tooltipPosition;
305
+ trigger?: 'hover' | 'focus' | 'click';
306
+ zIndex?: number;
307
+ children: JSX_2.Element;
308
+ }
309
+
310
+ export declare function VerificationStatus(props: VerificationStatusProps): default_2.JSX.Element;
311
+
312
+ export declare type VerificationStatusProps = {
313
+ verificationStatus: VerificationTypes;
314
+ };
315
+
316
+ declare enum VerificationTypes {
317
+ NEW = "New",
318
+ VERIFIED = "Verified",
319
+ REJECTED = "Rejected"
9
320
  }
10
321
 
11
322
  export { }