@inntechcorp/it-design 2.1.33 → 2.1.34

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.
Files changed (2) hide show
  1. package/dist/index.d.mts +1574 -95
  2. package/package.json +43 -43
package/dist/index.d.mts CHANGED
@@ -1,96 +1,1575 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as react from 'react';
3
+ import react__default, { MutableRefObject, RefObject, Context, ReactNode, ForwardRefExoticComponent, PropsWithoutRef, RefAttributes, FunctionComponent, Ref, FocusEvent, KeyboardEvent, MouseEvent, ReactElement, CSSProperties } from 'react';
4
+ import { ChildrenProps as ChildrenProps$1 } from 'types/ChildrenProps';
5
+ import { IStyledComponent } from 'styled-components';
6
+ import { Cancel, AxiosProgressEvent } from 'axios';
7
+ import { SelectValue as SelectValue$1 } from 'types/SelectProps';
8
+ import { ModalState as ModalState$1, FormValidationTypes as FormValidationTypes$1 } from 'enums/enum';
9
+ import moment$1 from 'moment';
10
+ import { ModalProps as ModalProps$1 } from 'types/ModalProps';
11
+ import { RadioButtonProps as RadioButtonProps$1, RadioGroupProps as RadioGroupProps$1 } from 'types/RadioProps';
12
+ import { ITDImperativeFuncProps as ITDImperativeFuncProps$1 } from 'types/ITDImperativeFuncProps';
13
+ import { ResultProps as ResultProps$1 } from 'types/ResultProps';
14
+
15
+ type ITDContextType = {
16
+ theme: string;
17
+ brokenImage: string;
18
+ dateFormat: string;
19
+ language: string;
20
+ locale: string;
21
+ changeTheme: (value: string) => void;
22
+ changeBrokenImage: (value: string) => void;
23
+ changeDateFormat: (value: string) => void;
24
+ changeLocale: (value: string) => void;
25
+ changeLanguage: (value: string) => void;
26
+ };
27
+ type ITDProviderProps = {
28
+ theme?: string;
29
+ language?: string;
30
+ dateFormat?: string;
31
+ children: ChildrenProps$1;
32
+ };
33
+ declare const ITDContext: react.Context<ITDContextType>;
34
+ declare const ITDProvider: (props: ITDProviderProps) => react_jsx_runtime.JSX.Element;
35
+
36
+ declare function DetermineNewHeight(originalHeight: number, originalWidth: number, newWidth: number): number;
37
+
38
+ declare function DetermineNewWidth(originalHeight: number, originalWidth: number, newHeight: number): number;
39
+
40
+ declare function FindSelector(searchClassName: string): boolean;
41
+
42
+ declare function GetCountryCodeByCurrencyCode(currency?: string): "en" | "tr" | "eu" | "uk";
43
+
44
+ declare function GetCountryCodeByLanguage(language: string): "tur" | "usa" | "language_not_found";
45
+
46
+ declare function ConvertCurrency(balance: number, currency: string): string;
47
+
48
+ declare function GetByCurrency(value: number, symbol?: boolean, currency?: string, decimal?: number): string;
49
+
50
+ declare function GetCurrencyFormat(value: string, currency?: string): string;
51
+
52
+ declare function GetCurrencySymbol(currency?: string): "₺" | "$" | "€" | "?";
53
+
54
+ declare function GetDecimalByCurrency(currency?: string): "." | ",";
55
+
1
56
  /**
2
- * CONTEXT PROVIDER
3
- */
4
- export { ITDProvider } from './context/ITDContext';
5
- /**
6
- * CONTEXT
7
- */
8
- export { default as ITDContext } from './context/ITDContext';
9
- /**
10
- * HELPERS
11
- */
12
- export * from './helpers';
13
- /**
14
- * HOOKS
15
- */
16
- export * from './hooks';
17
- /**
18
- * HTML
19
- */
20
- export * from './html/header';
21
- /**
22
- * ICONS
23
- */
24
- export * from './icons';
25
- /**
26
- * FORWARDED REF COMPONENTS
27
- */
28
- export { default as Select } from './select';
29
- export { default as Form } from './form';
30
- export { default as Checkbox } from './checkbox';
31
- export { default as Accordion } from './accordion';
32
- export { default as Calendar } from './calendar';
33
- export { default as DatePicker } from './datepicker';
34
- export { default as Input } from './input';
35
- export { default as TextArea } from './textarea';
36
- export { default as Switch } from './switch';
37
- export { default as Tooltip } from './tooltip';
38
- export { default as Upload } from './upload';
39
- /**
40
- * COMPONENTS (HAS SUB COMPONENTS)
41
- */
42
- export { default as Collapse } from './collapse';
43
- export { default as ModalManager } from './modal';
44
- export { default as Notification } from './notification';
45
- export { default as Radio } from './radio';
46
- export { default as InlineSelect } from './inlineselect';
47
- /**
48
- * COMPONENTS
49
- */
50
- export { default as Image } from './image';
51
- export { default as ConsoleLog } from './logger';
52
- export { default as Button } from './button';
53
- export { default as Alert } from './alert';
54
- export { default as Result } from './result';
55
- export { default as ALink } from './alink';
56
- export { default as Spin } from './spin';
57
- export { default as BackTop } from './back-top';
58
- export { default as Status } from './status';
59
- export { default as Progress } from './progress';
60
- export { default as TinyScrollbar } from './tinyscrollbar';
61
- export { default as Tabs } from './tabs';
62
- export { default as Card } from './card';
63
- export { default as Table } from './table';
64
- export { default as Flex } from './flex';
65
- export type { FormContextType } from './form/context/FormContext';
66
- export type { NotificationContextType } from './notification/context/NotificationsContext';
67
- export type { ITDContextType, ITDProviderProps } from './context/ITDContext';
68
- export type { QueryValueProps } from './types/QueryValueProps';
69
- export type { AccordionProps } from './types/AccordionProps';
70
- export type { AccordionSubMenuProps } from './types/AccordionSubMenuProps';
71
- export type { AccordionItemProps } from './types/AccordionItemProps';
72
- export type { InputProps, InputVariant } from './types/InputProps';
73
- export type { DatePickerProps } from './types/DatePickerProps';
74
- export type { CalendarProps, CalendarValueProps, CalendarDayProps } from './types/CalendarProps';
75
- export type { TextAreaProps, TextAreaVariant, TextAreaEvent } from './types/TextAreaProps';
76
- export type { RadioGroupProps, RadioButtonProps, RadioType, Direction } from './types/RadioProps';
77
- export type { SelectProps, SelectToggleProps, SelectOptionProps, SelectValue, SelectVariant, SelectDirection, SelectPosition } from './types/SelectProps';
78
- export type { CheckboxProps, CheckboxGroupProps, GroupCheckboxOptionType, CheckboxEvent } from './types/CheckboxProps';
79
- export type { ITDImperativeFuncProps } from './types/ITDImperativeFuncProps';
80
- export type { SingleQueryProps } from './types/SingleQueryProps';
81
- export type { ButtonProps, ButtonType, ButtonVariant, ButtonState, ButtonContentPosition } from './types/ButtonProps';
82
- export type { FormProps, FormRuleProps, FormValueProps, FormItemProps, FormSubComponentProps, FieldUpdateProps } from './types/FormProps';
83
- export type { NotificationsProps } from './types/NotificationsProps';
84
- export type { AlertProps, AlertType, AlertSize } from './types/AlertProps';
85
- export type { SwitchProps } from './types/SwitchProps';
86
- export type { ModalProps, ModalContentProps, ModalRefProps } from './types/ModalProps';
87
- export type { UploadProps, UploadProgressProps, UploadResultMessageProps } from './types/UploadProps';
88
- export type { ResultProps } from './types/ResultProps';
89
- export type { TabsItemProps, TabsProps } from './types/TabsProps';
90
- export type { TableColumnType, TableProps, TableTRProps, TableRow, TableRefProps } from './types/TableProps';
91
- export type { CardProps } from './types/CardProps';
92
- export type { ProgressProps, ProgressStatus } from './types/ProgressProps';
93
- export type { StatusProps, StatusVariant } from './types/StatusProps';
94
- export type { ITDSize, ITDSizeSlug } from './types/ITDProps';
95
- export type { FlexProps, FlexAlignProps, FlexGapProps, FlexJustifyProps } from './types/FlexProps';
96
- export { ModalState, FileExtensions, FileTypes, FormValidationTypes } from './enums/enum';
57
+ *
58
+ */
59
+ declare function AddDefaultThemeStyle(): void;
60
+
61
+ /**
62
+ *
63
+ * @param {*} theme
64
+ */
65
+ declare function UpdateThemeStyle(theme: string): void;
66
+
67
+ declare function IsValidJSON(item: string | {}): boolean;
68
+
69
+ declare function AddZero(num: string): string;
70
+
71
+ declare function RemoveUnits(value: string): number;
72
+
73
+ /**
74
+ * Returns an array with arrays of the given size.
75
+ *
76
+ * @param array {Array} array to split
77
+ * @param chunk_size {Integer} Size of every group
78
+ */
79
+ declare function ChunkArray(array: [], chunk_size: number): never[];
80
+
81
+ /**
82
+ *
83
+ * @param text
84
+ * @param entryType
85
+ * @returns
86
+ */
87
+ declare function FileChecker(text?: string, entryType?: string): boolean;
88
+
89
+ declare function CheckFileURL(url: string): false | Promise<boolean>;
90
+
91
+ /**
92
+ *
93
+ *
94
+ *
95
+ */
96
+ declare function UniUpperCase(value?: string, lang?: string): string;
97
+
98
+ declare function FormatBytes(bytes: number, decimals?: number): string;
99
+
100
+ declare function GetTypeByFileType(type: FileTypes): "" | FileExtensions;
101
+
102
+ declare function Wait(milliseconds: number): Promise<unknown>;
103
+
104
+ declare const SVGLoader: (src: string, width?: string | number, height?: string | number) => react_jsx_runtime.JSX.Element;
105
+
106
+ declare function FormatDate(date: Date, locale?: string, format?: string): string;
107
+
108
+ declare function FormatDateTime(date: Date, locale?: string, format?: string): string;
109
+
110
+ declare function FormatSimpleDate(date: Date, locale?: string, format?: string): string;
111
+
112
+ declare function FormatSimpleDateTime(date: Date, locale?: string, format?: string): string;
113
+
114
+ declare function FormatTime(time: moment.MomentInput, locale?: string, format?: string): string;
115
+
116
+ declare function TranslateCell(cell: string, options?: any): string;
117
+
118
+ declare function AddDefaultUnit(value: string | number): string;
119
+
120
+ declare function Base64Encode(input: string): string;
121
+
122
+ declare function Base64Decode(encoded: string): string;
123
+
124
+ /**
125
+ * What are SEO stop words?
126
+ *
127
+ * SEO stop words (Google stop words, stopwords) are generic common words
128
+ * (and, or, besides, in, a, the, do, they, etc.) that Google may omit in
129
+ * search query processing because they don’t usually affect the meaning of the query.
130
+ * These words are actually used for grammatical purposes and don’t communicate a message on their own.
131
+ *
132
+ * For example, if you google something like “best carrot cake recipe” and “the best carrot cake recipe”,
133
+ * the SERP will anyway feature links to pages with carrot cake recipes. In this case, the does not
134
+ * add any meaning to the query.
135
+ *
136
+ */
137
+ /**
138
+ *
139
+ * ### toKebabCase
140
+ *
141
+ * First, removes special characters from the provided string value and converts it to lowercase.
142
+ *
143
+ * @param value The input string.
144
+ * @param removeStopWords Removes stop words if true.
145
+ * @param removeNumbers Removes numbers if true.
146
+ *
147
+ * @returns If `toKebabCase("bu 123 bir örnek 456 cümle", true, true)` is provided, it will return `"ornek-cumle"`.
148
+ *
149
+ */
150
+ declare function toKebabCase(value: string, removeStopWords?: boolean, removeNumbers?: boolean): string;
151
+
152
+ type Nullable<T> = T | null;
153
+ type THandler = Nullable<(value: string | null) => void>;
154
+ declare const useReCaptcha: (handler: THandler) => {
155
+ loadReCaptcha: (key: string) => void;
156
+ executeReCaptcha: () => void;
157
+ };
158
+
159
+ /**
160
+ *
161
+ * This hook acting like a class constructor.
162
+ *
163
+ * @param {*} callBack
164
+ *
165
+ * @returns
166
+ *
167
+ */
168
+ declare const useConstructor: (callBack?: () => void) => void;
169
+
170
+ /**
171
+ *
172
+ * ADD EXTERNAL CSS
173
+ *
174
+ * Dinamik css dosyalarını yüklemek için kullanılır. Eğer yüklenecek
175
+ * olan css dosyası daha önce eklenmiş ise tekrar yüklemez. Bunu yükleyen
176
+ * component ekrandan silinirse yüklediği yazı da silinir.
177
+ *
178
+ * @param link string
179
+ * @param temporary boolean
180
+ *
181
+ */
182
+ declare const useAddExternalCSS: (link: string, temporary?: boolean) => void;
183
+
184
+ /**
185
+ *
186
+ *
187
+ *
188
+ * @param {*} id
189
+ * @param {*} style
190
+ * @param {*} handler
191
+ */
192
+ declare const useCreateDynamicStyle: (style: {}, handler: (id: string) => void, id?: string) => void;
193
+
194
+ /**
195
+ *
196
+ * styled-component <> gibi kullanılmadığı zaman class içeriğini
197
+ * yazmıyor. Bu kod bunu çözüyor. styled class'ının değerini id'si
198
+ * ile birlikte alıp head'e kayıt ediyor ve component ekrandan
199
+ * kaldırıldığında kendini siliyor.
200
+ *
201
+ * @param styled
202
+ * @param handler
203
+ */
204
+ declare const useCreateStyledStyle: (styled: IStyledComponent<any, any>, handler: (id: string) => void) => void;
205
+
206
+ /**
207
+ *
208
+ * document objesine event listener ekler ve ref dışarısında
209
+ * herhangi bir alana tıklanıldığında ref'in kapatılmasını sağlar.
210
+ *
211
+ * @param ref
212
+ * @param handler
213
+ *
214
+ */
215
+ declare const useOnClickOutside: (ref: MutableRefObject<HTMLDivElement | null>, handler: (event: PointerEvent) => void) => void;
216
+
217
+ /**
218
+ *
219
+ * document objesine event listener ekler ve ESC tuşuna basıldığında
220
+ * çağrılır.
221
+ *
222
+ * @param {*} handler
223
+ *
224
+ */
225
+ declare const useOnESCKeyDown: (handler: (event: Event) => void) => void;
226
+
227
+ /**
228
+ *
229
+ * #### useSingleQuery
230
+ *
231
+ * Tarayıcılardaki Query String yapısına ekleme/çıkarma veya kontrolünü yapar.
232
+ * Aynı anda sadece tek bir değer değiştirebilir, çoklu işlemler için useMultiQuery
233
+ * sınıfı kullanılmalıdır.
234
+ *
235
+ * Type guard sistemine sahiptir ve istenilen query string değeri, istenilen bir
236
+ * tipte döndürülebilir. Desteklediği tipler, string, number, boolean ve array'dir.
237
+ * Obje tipi desteklenmemektedir.
238
+ *
239
+ * @returns
240
+ *
241
+ */
242
+ declare const useSingleQuery: () => SingleQueryProps;
243
+
244
+ declare const useMultiQuery: () => {
245
+ set: (queries?: {
246
+ type: string;
247
+ value: string;
248
+ }[]) => void;
249
+ };
250
+
251
+ /**
252
+ *
253
+ * window objesine event listener ekler ve
254
+ * sayfa resize olduğunda çağrılır.
255
+ *
256
+ * @param {*} handler
257
+ *
258
+ */
259
+ declare const useOnResize: (handler: (event: Event) => void) => void;
260
+
261
+ /**
262
+ *
263
+ * window objesine event listener ekler ve
264
+ * kullanıcı online ve offline olduğunda çağrılır.
265
+ *
266
+ * @param {*} handler
267
+ *
268
+ */
269
+ declare const useConnectionStatus: (handler: (event: Event) => void) => void;
270
+
271
+ declare const useComponentSize: (comRef: RefObject<any>) => {
272
+ width: number;
273
+ height: number;
274
+ }[];
275
+
276
+ /**
277
+ *
278
+ * useCoreFetch
279
+ * --
280
+ *
281
+ * All API routes within the application pass through this class. It filters all
282
+ * responses returned from the API and processes them to their expected state.
283
+ * Then, it returns the success or failure status.
284
+ *
285
+ * Additionally, it retrieves and adds additional information such as language,
286
+ * token, currency, etc., from the user's cookie to API calls.
287
+ *
288
+ * @param changeLogout The function used to log out the user when called from places where
289
+ * context data such as React.Portal cannot be accessed needs to be passed.
290
+ * @param isUserLoggedOut User's logout information.
291
+ *
292
+ * @returns
293
+ *
294
+ */
295
+ declare const useCoreFetch: () => {
296
+ fetch: ({ action, requestMethod, addOrigin, params, queries, headers, cancelable, onFetched, onError, onCanceled, onProgress, }: {
297
+ action: string;
298
+ requestMethod?: string;
299
+ addOrigin?: boolean;
300
+ params?: {};
301
+ queries?: {};
302
+ headers?: {};
303
+ cancelable?: boolean;
304
+ onFetched?: (result: any) => void;
305
+ onError?: (err: string, code: number) => void;
306
+ onCanceled?: (message: Cancel) => void;
307
+ onProgress?: (event: AxiosProgressEvent) => void;
308
+ }) => Promise<void>;
309
+ cancel: () => void;
310
+ };
311
+
312
+ declare const useContextBridge: (...contexts: Context<any>[] | []) => (({ children }: {
313
+ children: ReactNode;
314
+ }) => react_jsx_runtime.JSX.Element) | (({ children }: {
315
+ children: ReactNode;
316
+ }) => ReactNode);
317
+
318
+ interface UseKeyboardShortcutProps {
319
+ key: string;
320
+ onKeyPressed: () => void;
321
+ }
322
+ declare const useKeyboardShortcut: ({ key, onKeyPressed }: UseKeyboardShortcutProps) => void;
323
+
324
+ type OrientationType = "portrait" | "landscape";
325
+ declare const useOrientation: () => OrientationType;
326
+
327
+ declare const H1: ({ children }: {
328
+ children: ChildrenProps$1;
329
+ }) => react_jsx_runtime.JSX.Element;
330
+
331
+ declare const H2: ({ children }: {
332
+ children: ChildrenProps$1;
333
+ }) => react_jsx_runtime.JSX.Element;
334
+
335
+ declare const H3: ({ children }: {
336
+ children: ChildrenProps$1;
337
+ }) => react_jsx_runtime.JSX.Element;
338
+
339
+ declare const H4: ({ children }: {
340
+ children: ChildrenProps$1;
341
+ }) => react_jsx_runtime.JSX.Element;
342
+
343
+ declare const Lock: ({ className, height, width }: {
344
+ className: any;
345
+ height: any;
346
+ width: any;
347
+ }) => react_jsx_runtime.JSX.Element;
348
+
349
+ declare const Arrow: ({ className, height, width }: {
350
+ className?: string | undefined;
351
+ height?: number | undefined;
352
+ width?: number | undefined;
353
+ }) => react_jsx_runtime.JSX.Element;
354
+
355
+ declare const Upload$1: ({ className, height, width }: {
356
+ className?: string | undefined;
357
+ height?: number | undefined;
358
+ width?: number | undefined;
359
+ }) => react_jsx_runtime.JSX.Element;
360
+
361
+ declare const BackToTop: ({ className, height, width }: {
362
+ className?: string | undefined;
363
+ height: any;
364
+ width: any;
365
+ }) => react_jsx_runtime.JSX.Element;
366
+
367
+ declare const Checkmark: ({ className, height, width }: {
368
+ className: any;
369
+ height: any;
370
+ width: any;
371
+ }) => react_jsx_runtime.JSX.Element;
372
+
373
+ declare const InlineSelectArrow: ({ className, height, width }: {
374
+ className: any;
375
+ height: any;
376
+ width: any;
377
+ }) => react_jsx_runtime.JSX.Element;
378
+
379
+ declare const Trash: ({ className, height, width }: {
380
+ className?: string | undefined;
381
+ height?: number | undefined;
382
+ width?: number | undefined;
383
+ }) => react_jsx_runtime.JSX.Element;
384
+
385
+ declare const ZoomIn: ({ className, height, width }: {
386
+ className?: string | undefined;
387
+ height?: number | undefined;
388
+ width?: number | undefined;
389
+ }) => react_jsx_runtime.JSX.Element;
390
+
391
+ declare const ZoomOut: ({ className, height, width }: {
392
+ className?: string | undefined;
393
+ height?: number | undefined;
394
+ width?: number | undefined;
395
+ }) => react_jsx_runtime.JSX.Element;
396
+
397
+ declare const Picture: ({ className, height, width }: {
398
+ className?: string | undefined;
399
+ height?: number | undefined;
400
+ width?: number | undefined;
401
+ }) => react_jsx_runtime.JSX.Element;
402
+
403
+ type IconProps = {
404
+ className?: string;
405
+ width?: number;
406
+ height?: number;
407
+ };
408
+ declare const NoData: ({ className, height, width }: IconProps) => react_jsx_runtime.JSX.Element;
409
+
410
+ type OptionsTypeProps = {
411
+ customKey?: string;
412
+ icon?: ChildrenProps$1;
413
+ image?: string;
414
+ label?: ChildrenProps$1;
415
+ value?: SelectValue$1;
416
+ multi?: boolean;
417
+ checked?: boolean;
418
+ onChange?: (value: SelectValue$1, checked: boolean, label: ChildrenProps$1) => null;
419
+ };
420
+ declare const _default$3: react.MemoExoticComponent<{
421
+ ({ multi, checked, icon, image, value, customKey, onChange, label }: OptionsTypeProps): react_jsx_runtime.JSX.Element;
422
+ displayName: string;
423
+ }>;
424
+
425
+ type SelectSubComponentProps = {
426
+ Option: typeof _default$3;
427
+ };
428
+ type SelectComponentProps = ForwardRefExoticComponent<PropsWithoutRef<SelectProps> & RefAttributes<ITDImperativeFuncProps>> & SelectSubComponentProps;
429
+ declare const Select: SelectComponentProps;
430
+
431
+ /**
432
+ *
433
+ * FORM FIELD GROUP
434
+ *
435
+ * @param className
436
+ * @param children
437
+ * @returns
438
+ *
439
+ */
440
+ type GroupProps = {
441
+ className?: string;
442
+ gap?: number;
443
+ horizontal?: boolean;
444
+ children?: ChildrenProps$1;
445
+ };
446
+ declare function Group({ gap, horizontal, className, children }: GroupProps): react_jsx_runtime.JSX.Element;
447
+
448
+ type ControlProps = {
449
+ className?: string;
450
+ position?: "start" | "end" | "center";
451
+ children?: ChildrenProps$1;
452
+ };
453
+ declare function Control({ position, className, children }: ControlProps): react_jsx_runtime.JSX.Element;
454
+
455
+ type ItemProps = {
456
+ name: string;
457
+ label?: string;
458
+ placeholder?: string;
459
+ error?: string;
460
+ rules?: FormRuleProps[];
461
+ mask?: string | null;
462
+ locked?: boolean;
463
+ dependency?: string;
464
+ reset?: any[];
465
+ query?: string;
466
+ children: ChildrenProps$1;
467
+ };
468
+ declare const Item$1: react.ForwardRefExoticComponent<ItemProps & react.RefAttributes<ITDImperativeFuncProps>>;
469
+
470
+ type FormContextType = {
471
+ register: (item: FormItemProps) => void;
472
+ unregister: (name: string) => void;
473
+ hasField: (name: string) => boolean;
474
+ checkFormIsValid: () => boolean;
475
+ getValues: () => {};
476
+ getFieldValue: (name: string) => FormValueProps;
477
+ getFieldValueByName: (name: string) => FormValueProps;
478
+ getFieldInstance: (name: string) => ITDImperativeFuncProps | null;
479
+ getFields: () => {
480
+ [key: string]: FormItemProps;
481
+ };
482
+ getFieldsInstance: () => {};
483
+ setName: (name: string) => void;
484
+ setInitialValues: (initialFields: {}, update?: boolean, validation?: boolean) => {};
485
+ setInvalidField: (name: string, message: string) => void;
486
+ setInvalidFields: (names: string[], message: string) => void;
487
+ setFieldValue: (name: string, value: FormValueProps) => void;
488
+ setFieldValueByName: (name: string, value: FormValueProps, update: boolean, validation: boolean) => void;
489
+ setFieldError: (name: string, message: string, validation?: boolean) => void;
490
+ removeFieldError: (name: string) => void;
491
+ updateField: (name: string, value: FormValueProps, update: boolean, valid: boolean) => void;
492
+ isFormValid: () => boolean;
493
+ isFieldsValid: (names: string[]) => boolean;
494
+ isFieldValid: (name: string) => boolean;
495
+ resetFields: (update?: boolean, validation?: boolean) => void;
496
+ removeFields: () => void;
497
+ formId: string;
498
+ updated: {};
499
+ };
500
+
501
+ type FormStoreProps = {
502
+ name: string;
503
+ onUpdate?: (values: {}) => void;
504
+ onFieldUpdate?: (update: FieldUpdateProps) => void;
505
+ onReset?: () => void;
506
+ useQueryString?: boolean;
507
+ };
508
+
509
+ type FormSubComponentProps$1 = {
510
+ Item: typeof Item$1;
511
+ Group: typeof Group;
512
+ Control: typeof Control;
513
+ useForm: () => FormContextType;
514
+ useFormAPI: FormStoreProps;
515
+ };
516
+ type FormComponentProps = ForwardRefExoticComponent<PropsWithoutRef<FormProps> & RefAttributes<FormContextType>> & FormSubComponentProps$1;
517
+ declare const Form: FormComponentProps;
518
+
519
+ declare const CheckboxGroup: react.ForwardRefExoticComponent<CheckboxGroupProps & react.RefAttributes<ITDImperativeFuncProps>>;
520
+
521
+ type CheckboxSubComponentProps = {
522
+ Group: typeof CheckboxGroup;
523
+ };
524
+ type CheckboxComponentProps = ForwardRefExoticComponent<PropsWithoutRef<CheckboxProps> & RefAttributes<ITDImperativeFuncProps>> & CheckboxSubComponentProps;
525
+ declare const Checkbox: CheckboxComponentProps;
526
+
527
+ declare function SubMenu({ id, link, icon, title, isSelected, useLink, onlyOne, subMenuLinkArrow, end, subMenuHeight, itemHeight, iconSize, arrowSize, onChange, children }: AccordionSubMenuProps): react_jsx_runtime.JSX.Element;
528
+
529
+ declare const Item: ({ link, itemHeight, arrowSize, active, end, children }: AccordionItemProps) => react_jsx_runtime.JSX.Element;
530
+
531
+ type AccordionMenuSubComponents = {
532
+ SubMenu: typeof SubMenu;
533
+ Item: typeof Item;
534
+ };
535
+ type AccordionMenuProps = AccordionProps & {
536
+ className?: string;
537
+ };
538
+ declare const Accordion: FunctionComponent<AccordionMenuProps> & AccordionMenuSubComponents;
539
+
540
+ declare const Calendar: ({ value, defaultValue, className, onChange, disabledDate }: {
541
+ value?: string;
542
+ defaultValue?: string;
543
+ className?: string;
544
+ onChange?: ((value: CalendarValueProps) => void) | null;
545
+ disabledDate?: (date: moment$1.Moment) => boolean;
546
+ }) => react_jsx_runtime.JSX.Element | null;
547
+
548
+ declare const DatePicker: react.ForwardRefExoticComponent<DatePickerProps & react.RefAttributes<ITDImperativeFuncProps>>;
549
+
550
+ /**
551
+ * https://github.com/sanniassin/react-input-mask
552
+ * http://sanniassin.github.io/react-input-mask/demo.html
553
+ * https://dev.to/adrianbdesigns/let-s-create-a-floating-label-input-with-html-and-css-only-4mo8
554
+ */
555
+ declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<ITDImperativeFuncProps>>;
556
+
557
+ declare const TextArea: react.ForwardRefExoticComponent<TextAreaProps & react.RefAttributes<ITDImperativeFuncProps>>;
558
+
559
+ declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<ITDImperativeFuncProps>>;
560
+
561
+ declare const Tooltip: react__default.ForwardRefExoticComponent<react__default.RefAttributes<any>>;
562
+
563
+ /**
564
+ *
565
+ * UPLOAD
566
+ * --
567
+ *
568
+ *
569
+ *
570
+ * @returns
571
+ *
572
+ */
573
+ declare const Upload: react.ForwardRefExoticComponent<UploadProps & react.RefAttributes<ITDImperativeFuncProps>>;
574
+
575
+ declare function Panel({ id, link, icon, title, hasOpen, useLink, onChange, children }: {
576
+ id?: string | undefined;
577
+ link?: string | undefined;
578
+ icon?: string | undefined;
579
+ title?: string | undefined;
580
+ hasOpen?: boolean | undefined;
581
+ useLink?: boolean | undefined;
582
+ onChange?: null | undefined;
583
+ children?: null | undefined;
584
+ }): react_jsx_runtime.JSX.Element;
585
+
586
+ declare function Collapse({ useLink, children }: {
587
+ useLink?: boolean | undefined;
588
+ children: any;
589
+ }): react_jsx_runtime.JSX.Element;
590
+ declare namespace Collapse {
591
+ export { Panel };
592
+ }
593
+
594
+ type ModalContextType = {
595
+ /**
596
+ * Opens a new modal with the provided information of the modal to be opened.
597
+ *
598
+ * @param data Contains the desired parameters for opening a new modal `ModalProps`.
599
+ * @returns
600
+ */
601
+ showModal: (data: ModalProps$1) => void;
602
+ /**
603
+ * Dismisses the currently open modal with the ID of the modal to be hidden.
604
+ *
605
+ * @param id ID of the modal to be hide.
606
+ * @returns
607
+ */
608
+ hideModal: (id: string) => void;
609
+ /**
610
+ * Dismisses the currently open modal with the ID of the modal to be closed.
611
+ *
612
+ * @param id ID of the modal to be dismissed.
613
+ * @returns
614
+ */
615
+ removeModal: (id: string) => void;
616
+ /**
617
+ *
618
+ * @returns
619
+ */
620
+ removeAllModals: () => void;
621
+ /**
622
+ * Triggered whenever any event related to modals occurs.
623
+ */
624
+ modalEvent: {
625
+ event: ModalState$1;
626
+ id: string;
627
+ };
628
+ /**
629
+ * Returns whether a modal is visible or not.
630
+ *
631
+ * @param id The visibility information of the desired modal with its ID.
632
+ * @returns
633
+ */
634
+ isVisible: (id: string) => boolean;
635
+ };
636
+
637
+ declare const ModalManager: {
638
+ useModal: () => ModalContextType;
639
+ };
640
+
641
+ type NotificationContextType = {
642
+ addNotification: (notification: NotificationsProps) => void;
643
+ removeNotification: (id: string) => void;
644
+ };
645
+
646
+ declare const Notification: {
647
+ useNotifications: () => NotificationContextType;
648
+ };
649
+
650
+ declare function RadioButton({ id, name, value, type, buttonProps, checked, hasError, children, icon, image, component, onChange }: RadioButtonProps$1): react_jsx_runtime.JSX.Element;
651
+
652
+ declare const _default$2: react__default.NamedExoticComponent<RadioGroupProps$1 & react__default.RefAttributes<ITDImperativeFuncProps$1>>;
653
+
654
+ interface RadioComponent extends React.FC {
655
+ Group: typeof _default$2;
656
+ Button: typeof RadioButton;
657
+ }
658
+ declare const Radio: RadioComponent;
659
+
660
+ declare const _default$1: react__default.MemoExoticComponent<({ value, checked, single, onChange, children }: {
661
+ value?: string | undefined;
662
+ checked?: boolean | undefined;
663
+ single?: boolean | undefined;
664
+ onChange?: null | undefined;
665
+ children?: null | undefined;
666
+ }) => react_jsx_runtime.JSX.Element>;
667
+
668
+ declare function InlineSelect({ label, value, children, single, minWidth, className, onChange }: {
669
+ label?: string | undefined;
670
+ value?: never[] | undefined;
671
+ children?: null | undefined;
672
+ single?: boolean | undefined;
673
+ minWidth?: number | undefined;
674
+ className?: string | undefined;
675
+ onChange?: null | undefined;
676
+ }): react_jsx_runtime.JSX.Element;
677
+ declare namespace InlineSelect {
678
+ export { _default$1 as Option };
679
+ }
680
+
681
+ interface ImageProps extends react__default.ImgHTMLAttributes<HTMLImageElement> {
682
+ src: string;
683
+ fallback?: string;
684
+ brokenWidth?: number | string;
685
+ brokenHeight?: number | string;
686
+ onLoad?: () => void;
687
+ onError?: () => void;
688
+ }
689
+ declare const _default: react__default.NamedExoticComponent<ImageProps>;
690
+
691
+ declare namespace ConsoleLog {
692
+ export { single };
693
+ export { double };
694
+ export { table };
695
+ }
696
+ declare function single(message: any, type?: string): void;
697
+ declare function double(title: any, message: any, type?: string): void;
698
+ declare function table(data: any): void;
699
+
700
+ declare const Button: ({ id, disabled, loading, selected, circle, strecth, justify, contentPosition, type, variant, size, state, icon, href, target, className, children, onClick }: ButtonProps) => react_jsx_runtime.JSX.Element;
701
+
702
+ declare const Alert: {
703
+ ({ type, size, title, className, children }: AlertProps): react_jsx_runtime.JSX.Element;
704
+ displayName: string;
705
+ };
706
+
707
+ declare const Result: {
708
+ ({ image, title, description, extra, footer, type, fill, autoCenter, background, animation }: ResultProps$1): react_jsx_runtime.JSX.Element;
709
+ displayName: string;
710
+ };
711
+
712
+ declare const ALink: (props: any) => react_jsx_runtime.JSX.Element;
713
+
714
+ interface ISpin {
715
+ updating?: boolean;
716
+ opacity?: boolean;
717
+ size?: number;
718
+ className?: string;
719
+ children?: any;
720
+ }
721
+ declare const Spin: ({ updating, opacity, size, className, children }: ISpin) => react_jsx_runtime.JSX.Element | null;
722
+
723
+ declare function BackTop(props: any): react_jsx_runtime.JSX.Element;
724
+
725
+ declare function Status({ variant, size, stretch, children, className, }: StatusProps): react_jsx_runtime.JSX.Element;
726
+
727
+ declare function Progress({ status, percent, alwaysShowPercent, showInfo, className, }: ProgressProps): react_jsx_runtime.JSX.Element;
728
+
729
+ type TinyScrollbarProps = {
730
+ className: string;
731
+ children: ChildrenProps$1;
732
+ };
733
+ declare function TinyScrollbar({ className, children }: TinyScrollbarProps): react_jsx_runtime.JSX.Element;
734
+
735
+ declare const Tabs: ({ tabs, activeTabKey, className, variant, height, onTabChange }: TabsProps) => react_jsx_runtime.JSX.Element;
736
+
737
+ declare const Card: ({ title, titleSeparator, extra, tabs, onTabChange, minWidth, minHeight, children, activeTabKey, updating, contentPadding, }: CardProps) => react_jsx_runtime.JSX.Element;
738
+
739
+ declare const Table: <T extends TableRow>(props: TableProps<T> & {
740
+ ref?: Ref<TableRefProps>;
741
+ }) => react__default.ReactElement;
742
+
743
+ declare const Flex: ({ gap, justify, align, vertical, wrap, stretch, style, className, children }: FlexProps) => react_jsx_runtime.JSX.Element;
744
+
745
+ type QueryValueProps = string | number | boolean | string[] | number[];
746
+
747
+ type Element = string | number | React.ReactNode | undefined;
748
+ type ChildrenProps = Element | Element[] | null;
749
+
750
+ type AccordionProps = {
751
+ useLink?: boolean;
752
+ onlyOne?: boolean;
753
+ subMenuLinkArrow?: boolean;
754
+ subMenuHeight?: number;
755
+ itemHeight?: number;
756
+ iconSize?: number;
757
+ arrowSize?: number;
758
+ onChange?: null | ((id: string) => void);
759
+ children?: ChildrenProps;
760
+ };
761
+
762
+ type AccordionSubMenuProps = {
763
+ id: string;
764
+ link: string;
765
+ title: string;
766
+ icon?: string | React.ReactElement;
767
+ isSelected?: boolean;
768
+ useLink?: boolean;
769
+ onlyOne?: boolean;
770
+ subMenuLinkArrow?: boolean;
771
+ subMenuHeight?: number;
772
+ itemHeight?: number;
773
+ iconSize?: number;
774
+ arrowSize?: number;
775
+ end?: boolean;
776
+ onChange?: (id: string) => void;
777
+ children?: ChildrenProps;
778
+ };
779
+
780
+ type AccordionItemProps = {
781
+ link?: string;
782
+ itemHeight?: number;
783
+ arrowSize?: number;
784
+ active?: boolean;
785
+ end?: boolean;
786
+ children?: null | ChildrenProps;
787
+ };
788
+
789
+ declare enum InputTypes {
790
+ TEXT = "text",
791
+ NUMBER = "number",
792
+ CURRENCY = "currency",
793
+ PASSWORD = "password"
794
+ }
795
+ type InputType = `${InputTypes}`;
796
+ type InputVariant = "default" | "filled" | "dashed";
797
+ type InputProps = {
798
+ id?: string;
799
+ placeholder?: string;
800
+ value?: string;
801
+ defaultValue?: string;
802
+ type?: InputType;
803
+ className?: string;
804
+ size?: ITDSize;
805
+ variant?: InputVariant;
806
+ prefix?: ChildrenProps;
807
+ suffix?: ChildrenProps;
808
+ addonBefore?: ChildrenProps;
809
+ addonAfter?: ChildrenProps;
810
+ locked?: ChildrenProps | boolean;
811
+ status?: ChildrenProps;
812
+ minValue?: number;
813
+ maxValue?: number;
814
+ maxLength?: number;
815
+ disabled?: boolean;
816
+ floating?: boolean;
817
+ autoComplete?: boolean;
818
+ keepFocus?: boolean;
819
+ focusRef?: null | MutableRefObject<HTMLDivElement>;
820
+ mask?: null | string;
821
+ allowEmptyFormatting?: null | boolean;
822
+ allowLeadingZeros?: boolean;
823
+ decimalSeparator?: string;
824
+ thousandSeparator?: string;
825
+ decimalScale?: number;
826
+ onChange?: ((value: any) => void) | null;
827
+ onUpdate?: ((value: any, update: any, validation: boolean) => void) | null;
828
+ onFocus?: ((event: any) => void) | null;
829
+ onBlur?: ((event: FocusEvent<HTMLInputElement>) => void) | null;
830
+ onPressEnter?: ((event: KeyboardEvent) => void) | null;
831
+ onKeyDown?: ((event: KeyboardEvent) => void) | null;
832
+ children?: ChildrenProps;
833
+ };
834
+
835
+ type ITDSize = "x-small" | "small" | "medium" | "default" | "large" | "x-large";
836
+ type ITDSizeSlug = "xs" | "sm" | "md" | "df" | "lg" | "xlg";
837
+ type ITDPosition = "left" | "right";
838
+
839
+ type CalendarProps = {
840
+ id?: string;
841
+ placeholder?: string;
842
+ defaultValue: CalendarValueProps;
843
+ className?: string;
844
+ mask?: null | string;
845
+ size?: ITDSize;
846
+ variant?: InputVariant;
847
+ disabled?: boolean;
848
+ floating?: boolean;
849
+ suffix?: ChildrenProps;
850
+ onChange?: ((value: CalendarValueProps) => void) | null;
851
+ onUpdate?: ((value: any, update: any, validation: boolean) => void) | null;
852
+ disabledDate: (date: moment$1.Moment) => boolean;
853
+ };
854
+ type CalendarValueProps = {
855
+ localizated: string;
856
+ global: string;
857
+ };
858
+ type CalendarDayProps = {
859
+ date: moment$1.Moment;
860
+ today?: boolean;
861
+ selected?: boolean;
862
+ current?: boolean;
863
+ disabled?: boolean;
864
+ handleClick: (date: moment$1.Moment) => void;
865
+ };
866
+
867
+ type DatePickerProps = {
868
+ id?: string;
869
+ placeholder?: string;
870
+ defaultValue?: string;
871
+ value?: string;
872
+ className?: string;
873
+ mask?: null | string;
874
+ size?: ITDSize;
875
+ variant?: InputVariant;
876
+ disabled?: boolean;
877
+ floating?: boolean;
878
+ position?: ITDPosition;
879
+ suffix?: ChildrenProps;
880
+ onChange?: ((value: CalendarValueProps) => void) | null;
881
+ onUpdate?: ((value: any, update: any, validation: boolean) => void) | null;
882
+ disabledDate?: (date: moment$1.Moment) => boolean;
883
+ };
884
+
885
+ type TextAreaProps = {
886
+ id?: string;
887
+ placeholder?: string;
888
+ value?: string;
889
+ defaultValue?: string;
890
+ className?: string;
891
+ size?: ITDSize;
892
+ variant?: TextAreaVariant;
893
+ rows?: number;
894
+ maxLength?: number;
895
+ disabled?: boolean;
896
+ showCount?: boolean;
897
+ onChange?: ((event: TextAreaEvent) => void);
898
+ onUpdate?: ((value: any, update: any, validation: boolean) => void) | null;
899
+ children?: ChildrenProps;
900
+ };
901
+ type TextAreaEvent = {
902
+ value?: string | number | boolean;
903
+ className: string;
904
+ disabled: boolean;
905
+ target: RefObject<HTMLTextAreaElement>;
906
+ stopPropagation: () => void;
907
+ preventDefault: () => void;
908
+ };
909
+ type TextAreaVariant = "default" | "filled" | "dashed";
910
+
911
+ type ButtonProps = {
912
+ id?: string;
913
+ disabled?: boolean;
914
+ loading?: boolean;
915
+ selected?: boolean;
916
+ strecth?: boolean;
917
+ circle?: boolean;
918
+ justify?: string;
919
+ contentPosition?: ButtonContentPosition;
920
+ type?: ButtonType;
921
+ variant?: ButtonVariant;
922
+ state?: ButtonState;
923
+ size?: ITDSize;
924
+ icon?: string | ChildrenProps | SVGElement;
925
+ href?: string;
926
+ target?: string;
927
+ className?: string;
928
+ children?: ChildrenProps;
929
+ onClick?: null | ((event: MouseEvent<any>) => void);
930
+ };
931
+ type ButtonType = "button" | "submit" | "reset";
932
+ type ButtonVariant = "default" | "solid" | "filled" | "outline" | "ghost" | "link" | "statable" | "custom";
933
+ type ButtonState = "primary" | "secondary" | "request" | "approve" | "reject" | "pending" | "requested" | string | null;
934
+ type ButtonContentPosition = "left" | "right";
935
+
936
+ type RadioType = "default" | "primary";
937
+ type Direction = "column" | "row";
938
+ type RadioGroupProps = {
939
+ id?: string;
940
+ name?: string;
941
+ message?: string;
942
+ type?: RadioType;
943
+ defaultValue?: string;
944
+ value?: string;
945
+ className?: string;
946
+ direction?: Direction;
947
+ gap?: string;
948
+ length?: number;
949
+ onlyFlow?: boolean;
950
+ buttonProps?: ButtonProps;
951
+ onChange?: (value: string) => void;
952
+ onUpdate?: (value: string, update: boolean, validation: boolean) => void;
953
+ children?: React.ReactNode;
954
+ };
955
+ type RadioButtonProps = {
956
+ id?: string;
957
+ name?: string;
958
+ value?: string;
959
+ type?: RadioType;
960
+ checked?: boolean;
961
+ hasError?: boolean;
962
+ children?: React.ReactNode;
963
+ buttonProps?: ButtonProps;
964
+ icon?: string | null;
965
+ image?: string | null;
966
+ onChange?: (value: string) => void;
967
+ component?: ReactElement<any> | null;
968
+ };
969
+
970
+ type SelectProps = {
971
+ id?: string;
972
+ defaultValue?: SelectValue;
973
+ value?: SelectValue;
974
+ label?: string | number;
975
+ position?: SelectPosition;
976
+ direction?: SelectDirection;
977
+ multi?: boolean;
978
+ size?: ITDSize;
979
+ variant?: SelectVariant;
980
+ className?: string;
981
+ placeholder?: string;
982
+ prefix?: ChildrenProps;
983
+ suffix?: ChildrenProps;
984
+ icon?: string;
985
+ image?: string;
986
+ disabled?: boolean;
987
+ showSearch?: boolean;
988
+ locked?: boolean;
989
+ floating?: boolean;
990
+ style?: CSSProperties;
991
+ options?: SelectOptionProps[];
992
+ onChange?: ((value: SelectValue) => void) | null;
993
+ onUpdate?: ((value: SelectValue | undefined, update?: boolean, validation?: boolean) => void) | null;
994
+ };
995
+ type SelectToggleProps = {
996
+ id?: string;
997
+ label?: string | number | ChildrenProps;
998
+ value?: SelectValue | null;
999
+ errorMessage: string;
1000
+ multi: boolean;
1001
+ isOpen: boolean;
1002
+ showSearch: boolean;
1003
+ locked: boolean;
1004
+ disabled: boolean;
1005
+ labelType: string;
1006
+ placeholder: string;
1007
+ icon?: string;
1008
+ prefix?: ChildrenProps;
1009
+ suffix?: ChildrenProps;
1010
+ image?: string;
1011
+ size: ITDSize;
1012
+ onFocus: () => void;
1013
+ onBlur: () => void;
1014
+ onShow: (value: boolean) => void;
1015
+ onFilter: (value: string) => void;
1016
+ onChange: (open: boolean) => void;
1017
+ };
1018
+ type SelectOptionProps = {
1019
+ key?: string;
1020
+ label: string | number | ChildrenProps;
1021
+ value: SelectValue;
1022
+ icon?: ChildrenProps;
1023
+ image?: string;
1024
+ disabled?: boolean;
1025
+ };
1026
+ type SelectValue = string | number | (string | number)[];
1027
+ type SelectVariant = "default" | "solid" | "filled" | "outline" | "custom";
1028
+ type SelectPosition = "top" | "bottom";
1029
+ type SelectDirection = "right" | "left";
1030
+
1031
+ type CheckboxProps = {
1032
+ id?: string;
1033
+ value?: string | number | boolean;
1034
+ checked?: boolean;
1035
+ disabled?: boolean;
1036
+ variant?: CheckboxVariant;
1037
+ indeterminate?: boolean;
1038
+ className?: string;
1039
+ children?: ChildrenProps;
1040
+ onChange?: ((event: CheckboxEvent) => void);
1041
+ onUpdate?: ((value: any, update: any, validation: boolean) => void);
1042
+ };
1043
+ type CheckboxGroupProps = {
1044
+ id?: string;
1045
+ value?: (string | number | boolean)[];
1046
+ defaultValue?: (string | number | boolean)[];
1047
+ options?: GroupCheckboxOptionType[];
1048
+ disabled?: boolean;
1049
+ className?: string;
1050
+ children?: ChildrenProps | ReactElement<CheckboxProps> | Array<ReactElement<CheckboxProps>>;
1051
+ selectAll?: (value: boolean) => void;
1052
+ onChange?: ((values: (string | number | boolean)[]) => void);
1053
+ onUpdate?: ((value: (string | number | boolean)[], update: any, validation: boolean) => void);
1054
+ };
1055
+ type GroupCheckboxOptionType = {
1056
+ label: string;
1057
+ value: string | number | boolean;
1058
+ disabled?: boolean;
1059
+ };
1060
+ type CheckboxEvent = {
1061
+ checked: boolean;
1062
+ value?: string | number | boolean;
1063
+ className: string;
1064
+ disabled: boolean;
1065
+ target: RefObject<HTMLInputElement>;
1066
+ stopPropagation: () => void;
1067
+ preventDefault: () => void;
1068
+ };
1069
+ type CheckboxVariant = "default" | "filled";
1070
+
1071
+ type ITDImperativeFuncProps = {
1072
+ reset: (update?: boolean, validation?: boolean) => void;
1073
+ setValue: (value: any, update?: boolean, validation?: boolean) => void;
1074
+ getValue: () => any;
1075
+ setError: (message: string) => void;
1076
+ setFocus?: () => void;
1077
+ setDisabled?: (value: boolean) => void;
1078
+ forceUpdate?: () => void;
1079
+ clear: () => void;
1080
+ };
1081
+
1082
+ type SingleQueryProps = {
1083
+ set: (type: string, value: QueryValueProps) => void;
1084
+ get: <T>(paramName: string, defaultValue: T, minLength?: number) => T;
1085
+ remove: (type: string) => void;
1086
+ isEmpty: () => boolean;
1087
+ };
1088
+
1089
+ type FormProps = {
1090
+ initialValues?: {};
1091
+ children: ChildrenProps;
1092
+ onReset?: () => void;
1093
+ onUpdate?: (values: {}) => void;
1094
+ onFinish?: (values: {}) => void;
1095
+ onFinishFailed?: (values: {}) => void;
1096
+ onValidated?: (validate: boolean) => void;
1097
+ onFieldUpdate?: (update: FieldUpdateProps) => void;
1098
+ useQueryString?: boolean;
1099
+ className?: string;
1100
+ ref?: RefObject<FormContextType>;
1101
+ name: string;
1102
+ };
1103
+ type FormValueProps = string | number | object | boolean;
1104
+ type FieldUpdateProps = {
1105
+ name: string;
1106
+ value: FormValueProps;
1107
+ valid: boolean;
1108
+ };
1109
+ type FormRuleProps = {
1110
+ required?: boolean;
1111
+ type?: FormValidationTypes$1;
1112
+ field?: string;
1113
+ value?: string | number;
1114
+ message?: string;
1115
+ };
1116
+ type FormItemProps = {
1117
+ name: string;
1118
+ field: RefObject<ITDImperativeFuncProps>;
1119
+ valid: boolean;
1120
+ value?: FormValueProps;
1121
+ query: string;
1122
+ reset: any[];
1123
+ error: string;
1124
+ };
1125
+ type FormSubComponentProps = {
1126
+ Item: typeof Item$1;
1127
+ Group: typeof Group;
1128
+ Control: typeof Control;
1129
+ useForm: FormContextType;
1130
+ useFormAPI: FormStoreProps;
1131
+ };
1132
+
1133
+ type NotificationsProps = {
1134
+ id?: string;
1135
+ title: string;
1136
+ description: string;
1137
+ placement?: string;
1138
+ autoHide?: boolean;
1139
+ delay?: number;
1140
+ type: string;
1141
+ };
1142
+
1143
+ type AlertProps = {
1144
+ type?: AlertType;
1145
+ size?: AlertSize;
1146
+ icon?: string | ChildrenProps | SVGElement;
1147
+ title?: string;
1148
+ className?: string;
1149
+ children?: ChildrenProps;
1150
+ };
1151
+ type AlertType = "success" | "info" | "warning" | "error";
1152
+ type AlertSize = "x-small" | "small" | "medium" | "default" | "large" | "x-large";
1153
+
1154
+ type SwitchProps = {
1155
+ id?: string;
1156
+ label?: string;
1157
+ checked?: boolean;
1158
+ defaultChecked?: boolean;
1159
+ loading?: boolean;
1160
+ disabled?: boolean;
1161
+ onChange?: ((value: any) => void) | null;
1162
+ onUpdate?: ((value: any, update: any, validation: boolean) => void) | null;
1163
+ };
1164
+
1165
+ /**
1166
+ * #### ModalProps
1167
+ *
1168
+ * The properties passed when opening a new modal. The `showModal`
1169
+ * function requires certain properties to open a new modal.
1170
+ */
1171
+ type ModalProps = {
1172
+ /**
1173
+ * Modal ID. Used for listening to modal events.
1174
+ */
1175
+ id?: string;
1176
+ /**
1177
+ * Modal Classname.
1178
+ */
1179
+ className?: string;
1180
+ /**
1181
+ * Modal Title.
1182
+ */
1183
+ title?: ChildrenProps;
1184
+ /**
1185
+ * Modal Width.
1186
+ */
1187
+ width?: string | number;
1188
+ /**
1189
+ * Close modal when overlay is clicked.
1190
+ */
1191
+ closeOnClickOutside?: boolean;
1192
+ /**
1193
+ * Prevents modal from closing when ESC key is pressed.
1194
+ */
1195
+ preventESC?: boolean;
1196
+ /**
1197
+ * Remove other open modals.
1198
+ */
1199
+ removeOthers?: boolean;
1200
+ /**
1201
+ * Show/hide OK button.
1202
+ */
1203
+ showOkButton?: boolean;
1204
+ /**
1205
+ * Show/hide Cancel button.
1206
+ */
1207
+ showCancelButton?: boolean;
1208
+ /**
1209
+ * Show/hide close button on the top right corner of the modal.
1210
+ */
1211
+ showCloseButton?: boolean;
1212
+ /**
1213
+ * Text for the OK button.
1214
+ */
1215
+ okButtonText?: string;
1216
+ /**
1217
+ * The cancel button props.
1218
+ */
1219
+ cancelButtonText?: string;
1220
+ /**
1221
+ * The ok button props.
1222
+ */
1223
+ okButtonProps?: ButtonProps | null;
1224
+ /**
1225
+ * ModalProps for the Cancel button.
1226
+ */
1227
+ cancelButtonProps?: ButtonProps | null;
1228
+ /**
1229
+ * Custom properties to be passed to the modal.
1230
+ */
1231
+ customProps?: {} | any;
1232
+ /**
1233
+ * Custom context to be passed to the modal.
1234
+ */
1235
+ context?: {} | any;
1236
+ /**
1237
+ * Called when the OK button is clicked. If this
1238
+ * function is defined, a ModalEvent is triggered,
1239
+ * but the modal does not automatically close.
1240
+ * @returns
1241
+ */
1242
+ onOk?: (() => boolean | null) | null;
1243
+ /**
1244
+ * Called when the Cancel button is clicked. If this
1245
+ * function is defined, a ModalEvent is triggered,
1246
+ * but the modal does not automatically close.
1247
+ * @returns
1248
+ */
1249
+ onCancel?: (() => boolean | null) | null;
1250
+ /**
1251
+ * ModalManager can find its own ref, but some libraries
1252
+ * (@loadable, React.lazy, etc.) may have their own ref values,
1253
+ * which can prevent ModalManager from passing parameters and
1254
+ * accessing the actual ref. In such cases, if you want the modal
1255
+ * to use a ref, meaning you'll use forwardRef with ModalRefProps
1256
+ * inside the modal, you should pass "true".
1257
+ */
1258
+ useRef?: boolean;
1259
+ /**
1260
+ * ModalManager can find its own ref, but some libraries
1261
+ * (@loadable, React.lazy, etc.) may have their own ref
1262
+ * values, which can prevent ModalManager from passing
1263
+ * parameters and accessing the actual ref. In such cases,
1264
+ * this value should remain false. You can only set it to
1265
+ * "true" in projects where you are sure that all modals
1266
+ * are passed as Function Components.
1267
+ */
1268
+ checkAutoRef?: boolean;
1269
+ /**
1270
+ * Content of the modal. Any content you want to display in the modal.
1271
+ */
1272
+ content: ChildrenProps;
1273
+ /**
1274
+ * Adds content before the modal's content data.
1275
+ */
1276
+ addContentBefore?: ChildrenProps;
1277
+ /**
1278
+ * Adds content after the modal's content data.
1279
+ */
1280
+ addContentAfter?: ChildrenProps;
1281
+ /**
1282
+ * The padding of the modal content. The default value is "30px 20px".
1283
+ */
1284
+ contentPadding?: string;
1285
+ /**
1286
+ * The padding of the outer modal overlay. The default value is "50px".
1287
+ */
1288
+ outerPadding?: string;
1289
+ /**
1290
+ * The padding before the modal content. The default value is "30px 20px 0".
1291
+ */
1292
+ beforeContentPadding?: string;
1293
+ /**
1294
+ * The padding after the modal content. The default value is "0 20px 30px".
1295
+ */
1296
+ afterContentPadding?: string;
1297
+ };
1298
+ /**
1299
+ * #### Modal Content Props
1300
+ *
1301
+ * These properties can only be accessed from the content data defined within the modal.
1302
+ * When the content data is defined as an external class, these properties become accessible.
1303
+ */
1304
+ type ModalContentProps = {
1305
+ /**
1306
+ * Allows another modal to be opened from within the modal content.
1307
+ * @param data Values for the new modal to be opened.
1308
+ * @returns
1309
+ */
1310
+ showAnotherModal?: (data: ModalProps) => void;
1311
+ /**
1312
+ * Closes itself from within the modal content.
1313
+ * @returns
1314
+ */
1315
+ hideCurrentModal?: () => void;
1316
+ /**
1317
+ * Destroy itself from within the modal content.
1318
+ * @returns
1319
+ */
1320
+ removeCurrentModal?: () => void;
1321
+ /**
1322
+ * Changes the buttons disabling state.
1323
+ * @param value `true` for regular, `false` for disabled.
1324
+ * @returns
1325
+ */
1326
+ changeButtonsState?: (value: boolean) => void;
1327
+ /**
1328
+ * Changes the loading screen state that covers the entire modal.
1329
+ * @param value `true` indicates loading, `false` indicates stable state.
1330
+ * @returns
1331
+ */
1332
+ changeLoadingState?: (value: boolean) => void;
1333
+ /**
1334
+ * Changes the state that shows only the modal content is loading.
1335
+ * @param value `true` indicates loading, `false` indicates stable state.
1336
+ * @returns
1337
+ */
1338
+ changeInnerLoadingState?: (value: boolean) => void;
1339
+ /**
1340
+ * Extra parameters passed when the modal is opened.
1341
+ */
1342
+ modalProps?: any;
1343
+ /**
1344
+ * Context data to be used for access within the modal, functioning like `modalProps`.
1345
+ */
1346
+ context?: any;
1347
+ };
1348
+ /**
1349
+ * #### Modal Ref Props
1350
+ *
1351
+ * It can only be used within the modal content data that utilizes `forwardRef`
1352
+ * along with `useImperativeHandle`.
1353
+ */
1354
+ type ModalRefProps = {
1355
+ /**
1356
+ * If defined, it is triggered when the **OK** button inside the modal is clicked.
1357
+ * If you return `false`, it prevents the modal from closing. If you return `true`,
1358
+ * the process continues and the modal closes.
1359
+ * @returns
1360
+ */
1361
+ onClickOK?: () => void;
1362
+ /**
1363
+ * If defined, it is triggered when the **Cancel** button inside the modal is clicked.
1364
+ * If you return `false`, it prevents the modal from closing. If you return `true`,
1365
+ * the process continues and the modal closes.
1366
+ * @returns
1367
+ */
1368
+ onClickCancel?: () => void;
1369
+ };
1370
+
1371
+ type UploadProps = {
1372
+ id?: string;
1373
+ action?: string;
1374
+ filePath?: string | null;
1375
+ removeAction?: string;
1376
+ removeExtraFormData?: {};
1377
+ removeExtraQueryString?: {};
1378
+ removeExtraHeader?: {};
1379
+ binaryName?: string;
1380
+ resultFileName?: string | null;
1381
+ showDeleteIcon?: boolean;
1382
+ showPreviewIcon?: boolean;
1383
+ buttonsPosition?: "default" | "corners";
1384
+ containerWidth?: number | string;
1385
+ containerHeight?: number | string;
1386
+ maxFileWidth?: number | string;
1387
+ maxFileHeight?: number | string;
1388
+ fileWidth?: number | string;
1389
+ fileHeight?: number | string;
1390
+ padding?: number;
1391
+ fluid?: boolean;
1392
+ previewFileWidth?: number | string;
1393
+ previewFileHeight?: number | string;
1394
+ previewFilePadding?: number | string;
1395
+ fileTypes?: FileTypes[];
1396
+ maxFileSize?: number;
1397
+ requestMethod?: "put" | "post";
1398
+ extraFormData?: {};
1399
+ extraQueryString?: {};
1400
+ extraHeader?: {};
1401
+ disabled?: boolean;
1402
+ onChange?: ((value: any) => void) | null;
1403
+ onUpdate?: ((value: any, update: any, validation: boolean) => void) | null;
1404
+ onUploadSuccess?: (path: string) => void;
1405
+ onUploadFailed?: (message: string, code: number) => void;
1406
+ onRemoveFileSuccess?: (data?: any) => void;
1407
+ onRemoveFileFailed?: () => void;
1408
+ };
1409
+ type UploadProgressProps = {
1410
+ estimated: string;
1411
+ progress: number;
1412
+ bytes: string;
1413
+ total: string;
1414
+ };
1415
+ type UploadResultMessageProps = {
1416
+ message: string;
1417
+ status: "success" | "error" | "";
1418
+ };
1419
+
1420
+ type ResultProps = {
1421
+ image: string;
1422
+ title: string;
1423
+ description: string;
1424
+ type?: string;
1425
+ extra?: React.ReactElement | null;
1426
+ footer?: React.ReactElement | null;
1427
+ fill?: boolean;
1428
+ autoCenter?: boolean;
1429
+ background?: boolean;
1430
+ animation?: boolean;
1431
+ };
1432
+
1433
+ type TabsItemProps = {
1434
+ key: string;
1435
+ tab: string;
1436
+ children?: ChildrenProps;
1437
+ link?: string;
1438
+ };
1439
+ type TabsProps = {
1440
+ activeTabKey?: string;
1441
+ tabs?: TabsItemProps[];
1442
+ onTabChange?: (key: string) => void;
1443
+ variant?: "default" | "bold";
1444
+ height?: number;
1445
+ className?: string;
1446
+ };
1447
+
1448
+ type TableColumnType<T> = {
1449
+ key: keyof T | string;
1450
+ title: ChildrenProps;
1451
+ dataIndex?: keyof T;
1452
+ overflow?: boolean;
1453
+ width?: number | string;
1454
+ maxWidth?: number | string;
1455
+ minWidth?: number | string;
1456
+ render?: (value: any, record: T, index: number, level?: number) => React.ReactNode;
1457
+ };
1458
+ type TableProps<T extends TableRow> = {
1459
+ columns: TableColumnType<T>[];
1460
+ data: T[] | null;
1461
+ cellHeight?: number | string;
1462
+ size?: ITDSize;
1463
+ headless?: boolean;
1464
+ bordered?: boolean;
1465
+ dashed?: boolean;
1466
+ noGaps?: boolean;
1467
+ hideGroupButtons?: boolean;
1468
+ getTRProps?: (row: T, rowIndex: number, level: number) => TableTRProps;
1469
+ };
1470
+ type TableTRProps = {
1471
+ style?: React.CSSProperties;
1472
+ classNames?: string;
1473
+ };
1474
+ type TableRow = {
1475
+ key: string;
1476
+ children?: TableRow[];
1477
+ };
1478
+ type TableRefProps = {
1479
+ toggleRow: (key: string) => void;
1480
+ expandedRows: Set<string>;
1481
+ };
1482
+
1483
+ type CardProps = {
1484
+ title?: ChildrenProps;
1485
+ titleSeparator?: boolean;
1486
+ extra?: ChildrenProps;
1487
+ tabs?: {
1488
+ key: string;
1489
+ tab: string;
1490
+ }[];
1491
+ activeTabKey?: string;
1492
+ onTabChange?: (key: string) => void;
1493
+ updating?: boolean;
1494
+ minWidth?: number;
1495
+ minHeight?: number;
1496
+ contentPadding?: string;
1497
+ children: ChildrenProps;
1498
+ };
1499
+
1500
+ type ProgressProps = {
1501
+ status?: ProgressStatus;
1502
+ showInfo?: boolean;
1503
+ alwaysShowPercent?: boolean;
1504
+ percent?: number;
1505
+ className?: string;
1506
+ };
1507
+ type ProgressStatus = "normal" | "active" | "success" | "exception";
1508
+
1509
+ type StatusProps = {
1510
+ variant?: StatusVariant;
1511
+ size?: ITDSize;
1512
+ stretch?: boolean;
1513
+ children?: ChildrenProps;
1514
+ className?: string;
1515
+ };
1516
+ type StatusVariant = "gray-1" | "gray-2" | "gray-3" | "green" | "yellow" | "red" | "brown" | "lavender" | "pink" | "violet" | "blue" | "filled-red" | "filled-yellow" | "filled-pink" | "filled-blue" | "filled-green" | "filled-purple" | "filled-black";
1517
+
1518
+ type FlexProps = {
1519
+ gap?: FlexGapProps;
1520
+ justify?: FlexJustifyProps;
1521
+ align?: FlexAlignProps;
1522
+ vertical?: boolean;
1523
+ wrap?: boolean;
1524
+ stretch?: boolean;
1525
+ style?: CSSProperties;
1526
+ className?: string;
1527
+ children?: ChildrenProps;
1528
+ };
1529
+ type FlexGapProps = "small" | "medium" | "large" | string | number;
1530
+ type FlexJustifyProps = "unset" | "flex-start" | "center" | "flex-end" | "space-between" | "space-around" | "space-evenly";
1531
+ type FlexAlignProps = "unset" | "flex-start" | "center" | "flex-end";
1532
+
1533
+ declare enum ModalState {
1534
+ NOT_SHOW = "modal-not-show",
1535
+ BEGIN = "modal-begin",
1536
+ ENTERING = "modal-entering",
1537
+ ENTERED = "modal-entered",
1538
+ EXITING = "modal-exiting",
1539
+ EXITED = "modal-exited",
1540
+ REMOVED = "modal-removed",
1541
+ OK_CLICK = "modal-ok-button-click",
1542
+ CANCEL_CLICK = "modal-cancel-button-click",
1543
+ CLOSE_CLICK = "modal-close-button-click",
1544
+ OUTSIDE_CLICK = "modal-outside-click",
1545
+ ESC_CLICK = "modal-esc-click",
1546
+ ALL_REMOVED = "modal-all-removed"
1547
+ }
1548
+ declare enum FileTypes {
1549
+ SVG = "image/svg+xml",
1550
+ PNG = "image/png",
1551
+ JPG = "image/jpeg",
1552
+ GIF = "image/gif",
1553
+ PDF = "application/pdf",
1554
+ OTF = "font/otf"
1555
+ }
1556
+ declare enum FileExtensions {
1557
+ SVG = ".svg",
1558
+ PNG = ".png",
1559
+ JPG = ".jpg",
1560
+ GIF = ".gif",
1561
+ PDF = ".pdf",
1562
+ OTF = ".otf"
1563
+ }
1564
+ declare enum FormValidationTypes {
1565
+ MIN_LENGTH = "minLength",
1566
+ MAX_LENGTH = "maxLength",
1567
+ EXACT_LENGTH = "exactLength",
1568
+ SAME = "same",
1569
+ TC_IDENTITY = "TCIdentity",
1570
+ PASSWORD = "password",
1571
+ EMAIL = "email",
1572
+ USERNAME = "username"
1573
+ }
1574
+
1575
+ export { ALink, Accordion, type AccordionItemProps, type AccordionProps, type AccordionSubMenuProps, AddDefaultThemeStyle, AddDefaultUnit, AddZero, Alert, type AlertProps, type AlertSize, type AlertType, Arrow as ArrowIcon, BackToTop, BackTop, Base64Decode, Base64Encode, Button, type ButtonContentPosition, type ButtonProps, type ButtonState, type ButtonType, type ButtonVariant, Calendar, type CalendarDayProps, type CalendarProps, type CalendarValueProps, Card, type CardProps, CheckFileURL, Checkbox, type CheckboxEvent, type CheckboxGroupProps, type CheckboxProps, Checkmark, ChunkArray, Collapse, ConsoleLog, ConvertCurrency, DatePicker, type DatePickerProps, DetermineNewHeight, DetermineNewWidth, type Direction, type FieldUpdateProps, FileChecker, FileExtensions, FileTypes, FindSelector, Flex, type FlexAlignProps, type FlexGapProps, type FlexJustifyProps, type FlexProps, Form, type FormContextType, type FormItemProps, type FormProps, type FormRuleProps, type FormSubComponentProps, FormValidationTypes, type FormValueProps, FormatBytes, FormatDate, FormatDateTime, FormatSimpleDate, FormatSimpleDateTime, FormatTime, GetByCurrency, GetCountryCodeByCurrencyCode, GetCountryCodeByLanguage, GetCurrencyFormat, GetCurrencySymbol, GetDecimalByCurrency, GetTypeByFileType, type GroupCheckboxOptionType, H1, H2, H3, H4, ITDContext, type ITDContextType, type ITDImperativeFuncProps, ITDProvider, type ITDProviderProps, type ITDSize, type ITDSizeSlug, _default as Image, InlineSelect, InlineSelectArrow, Input, type InputProps, type InputVariant, IsValidJSON, Lock as LockIcon, type ModalContentProps, ModalManager, type ModalProps, type ModalRefProps, ModalState, NoData, Notification, type NotificationContextType, type NotificationsProps, Picture, Progress, type ProgressProps, type ProgressStatus, type QueryValueProps, Radio, type RadioButtonProps, type RadioGroupProps, type RadioType, RemoveUnits, Result, type ResultProps, SVGLoader, Select, type SelectDirection, type SelectOptionProps, type SelectPosition, type SelectProps, type SelectToggleProps, type SelectValue, type SelectVariant, type SingleQueryProps, Spin, Status, type StatusProps, type StatusVariant, Switch, type SwitchProps, Table, type TableColumnType, type TableProps, type TableRefProps, type TableRow, type TableTRProps, Tabs, type TabsItemProps, type TabsProps, TextArea, type TextAreaEvent, type TextAreaProps, type TextAreaVariant, TinyScrollbar, Tooltip, TranslateCell, Trash, UniUpperCase, UpdateThemeStyle, Upload, Upload$1 as UploadIcon, type UploadProgressProps, type UploadProps, type UploadResultMessageProps, Wait, ZoomIn, ZoomOut, toKebabCase, useAddExternalCSS, useComponentSize, useConnectionStatus, useConstructor, useContextBridge, useCoreFetch, useCreateDynamicStyle, useCreateStyledStyle, useKeyboardShortcut, useMultiQuery, useOnClickOutside, useOnESCKeyDown, useOnResize, useOrientation, useReCaptcha, useSingleQuery };