@inntechcorp/it-design 2.0.0
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/README.md +37 -0
- package/dist/accordion/index.d.ts +14 -0
- package/dist/accordion/item/Item.d.ts +3 -0
- package/dist/accordion/item/styled.components.d.ts +7 -0
- package/dist/accordion/submenu/SubMenu.d.ts +2 -0
- package/dist/accordion/submenu/styled.components.d.ts +11 -0
- package/dist/alert/alert.style.error.d.ts +4 -0
- package/dist/alert/alert.style.info.d.ts +4 -0
- package/dist/alert/alert.style.success.d.ts +4 -0
- package/dist/alert/alert.style.warning.d.ts +4 -0
- package/dist/alert/index.d.ts +6 -0
- package/dist/alert/styled.d.ts +9 -0
- package/dist/alink/index.d.ts +2 -0
- package/dist/alink/styled.d.ts +5 -0
- package/dist/back-top/index.d.ts +1 -0
- package/dist/back-top/styled.components.d.ts +6 -0
- package/dist/button/button.style.SVG.d.ts +4 -0
- package/dist/button/button.style.circle.d.ts +4 -0
- package/dist/button/button.style.default.d.ts +4 -0
- package/dist/button/button.style.filled.d.ts +4 -0
- package/dist/button/button.style.ghost.d.ts +4 -0
- package/dist/button/button.style.icon.d.ts +5 -0
- package/dist/button/button.style.link.d.ts +4 -0
- package/dist/button/button.style.outline.d.ts +4 -0
- package/dist/button/button.style.size.d.ts +4 -0
- package/dist/button/button.style.solid.d.ts +4 -0
- package/dist/button/button.style.strecth.d.ts +4 -0
- package/dist/button/index.d.ts +3 -0
- package/dist/button/styled.components.d.ts +15 -0
- package/dist/checkbox/group/index.d.ts +4 -0
- package/dist/checkbox/group/styled.d.ts +3 -0
- package/dist/checkbox/index.d.ts +10 -0
- package/dist/checkbox/styled.d.ts +9 -0
- package/dist/context/ITDContext.d.ts +23 -0
- package/dist/enums/enum.d.ts +41 -0
- package/dist/form/context/FormContext.d.ts +32 -0
- package/dist/form/context/FormStore.d.ts +11 -0
- package/dist/form/control/Control.d.ts +6 -0
- package/dist/form/control/styled.d.ts +3 -0
- package/dist/form/group/Group.d.ts +16 -0
- package/dist/form/group/styled.components.d.ts +5 -0
- package/dist/form/index.d.ts +20 -0
- package/dist/form/item/Item.d.ts +18 -0
- package/dist/form/validation/TCIdentity.d.ts +1 -0
- package/dist/form/validation/Validator.d.ts +14 -0
- package/dist/form/wrapper/FormWrapper.d.ts +15 -0
- package/dist/helpers/array/ChunkArray.d.ts +7 -0
- package/dist/helpers/aspectratio/DetermineNewHeight.d.ts +1 -0
- package/dist/helpers/aspectratio/DetermineNewWidth.d.ts +1 -0
- package/dist/helpers/binary/FormatBytes.d.ts +1 -0
- package/dist/helpers/binary/GetTypeByFileType.d.ts +2 -0
- package/dist/helpers/checker/CheckFileURL.d.ts +1 -0
- package/dist/helpers/checker/FileChecker.d.ts +7 -0
- package/dist/helpers/country/GetCountryCodeByCurrencyCode.d.ts +1 -0
- package/dist/helpers/country/GetCountryCodeByLanguage.d.ts +1 -0
- package/dist/helpers/css/FindSelector.d.ts +1 -0
- package/dist/helpers/currency/ConvertCurrency.d.ts +1 -0
- package/dist/helpers/currency/GetByCurrency.d.ts +1 -0
- package/dist/helpers/currency/GetCurrencyFormat.d.ts +1 -0
- package/dist/helpers/currency/GetCurrencySymbol.d.ts +1 -0
- package/dist/helpers/currency/GetDecimalByCurrency.d.ts +1 -0
- package/dist/helpers/index.d.ts +22 -0
- package/dist/helpers/json/IsValidJSON.d.ts +1 -0
- package/dist/helpers/math/AddZero.d.ts +1 -0
- package/dist/helpers/promise/Wait.d.ts +1 -0
- package/dist/helpers/remover/RemoveUnits.d.ts +1 -0
- package/dist/helpers/string/UniUpperCase.d.ts +6 -0
- package/dist/helpers/theme/AddDefaultThemeStyle.d.ts +4 -0
- package/dist/helpers/theme/UpdateThemeStyle.d.ts +5 -0
- package/dist/helpers/url/ValidURL.d.ts +1 -0
- package/dist/hooks/index.d.ts +13 -0
- package/dist/hooks/useAddExternalCSS.d.ts +14 -0
- package/dist/hooks/useComponentSize.d.ts +6 -0
- package/dist/hooks/useConnectionStatus.d.ts +10 -0
- package/dist/hooks/useConstructor.d.ts +11 -0
- package/dist/hooks/useCoreFetch.d.ts +37 -0
- package/dist/hooks/useCreateDynamicStyle.d.ts +10 -0
- package/dist/hooks/useCreateStyledStyle.d.ts +13 -0
- package/dist/hooks/useMultiQuery.d.ts +7 -0
- package/dist/hooks/useOnClickOutside.d.ts +12 -0
- package/dist/hooks/useOnESCKeyDown.d.ts +10 -0
- package/dist/hooks/useOnResize.d.ts +10 -0
- package/dist/hooks/useReCaptcha.d.ts +7 -0
- package/dist/hooks/useSingleQuery.d.ts +3 -0
- package/dist/icons/Arrow.d.ts +6 -0
- package/dist/icons/BackToTop.d.ts +6 -0
- package/dist/icons/Checkmark.d.ts +6 -0
- package/dist/icons/InlineSelectArrow.d.ts +6 -0
- package/dist/icons/Lock.d.ts +6 -0
- package/dist/icons/Picture.d.ts +6 -0
- package/dist/icons/Trash.d.ts +6 -0
- package/dist/icons/Upload.d.ts +6 -0
- package/dist/icons/ZoomIn.d.ts +6 -0
- package/dist/icons/ZoomOut.d.ts +6 -0
- package/dist/icons/index.d.ts +10 -0
- package/dist/index.cjs.js +971 -0
- package/dist/index.d.mts +73 -0
- package/dist/index.d.ts +1120 -0
- package/dist/index.esm.js +971 -0
- package/dist/input/index.d.ts +9 -0
- package/dist/input/styled.components.d.ts +36 -0
- package/dist/modal/container/ModalContainer.d.ts +12 -0
- package/dist/modal/container/styled.components.d.ts +6 -0
- package/dist/modal/context/ModalContext.d.ts +64 -0
- package/dist/modal/index.d.ts +14 -0
- package/dist/modal/modal/Modal.d.ts +9 -0
- package/dist/modal/modal/styled.components.d.ts +24 -0
- package/dist/notification/context/NotificationsContext.d.ts +8 -0
- package/dist/notification/index.d.ts +14 -0
- package/dist/result/index.d.ts +15 -0
- package/dist/result/styled.components.d.ts +17 -0
- package/dist/select/index.d.ts +10 -0
- package/dist/select/menu/Menu.d.ts +13 -0
- package/dist/select/menu/styled.components.d.ts +12 -0
- package/dist/select/option/Option.d.ts +16 -0
- package/dist/select/option/styled.components.d.ts +6 -0
- package/dist/select/style.settings.d.ts +17 -0
- package/dist/select/styled.components.d.ts +5 -0
- package/dist/select/toggle/Toggle.d.ts +17 -0
- package/dist/select/toggle/label/floating/FloatingLabel.d.ts +9 -0
- package/dist/select/toggle/label/floating/styled.components.d.ts +9 -0
- package/dist/select/toggle/label/single/SingleLabel.d.ts +8 -0
- package/dist/select/toggle/label/single/styled.components.d.ts +7 -0
- package/dist/select/toggle/styled.components.d.ts +29 -0
- package/dist/spin/index.d.ts +8 -0
- package/dist/spin/styled.components.d.ts +10 -0
- package/dist/stories/Accordion.d.ts +6 -0
- package/dist/stories/Accordion.stories.d.ts +20 -0
- package/dist/stories/Alert.d.ts +2 -0
- package/dist/stories/Alert.stories.d.ts +21 -0
- package/dist/stories/Button.d.ts +3 -0
- package/dist/stories/Button.stories.d.ts +27 -0
- package/dist/stories/ButtonIcon.d.ts +2 -0
- package/dist/stories/Checkbox.d.ts +2 -0
- package/dist/stories/Checkbox.stories.d.ts +21 -0
- package/dist/stories/CheckboxGroup.d.ts +2 -0
- package/dist/stories/CheckboxGroup.stories.d.ts +21 -0
- package/dist/stories/Form.d.ts +2 -0
- package/dist/stories/Form.stories.d.ts +20 -0
- package/dist/stories/Header.d.ts +3 -0
- package/dist/stories/Header.stories.d.ts +19 -0
- package/dist/stories/Input.d.ts +3 -0
- package/dist/stories/Input.stories.d.ts +22 -0
- package/dist/stories/ModalManager.d.ts +3 -0
- package/dist/stories/ModalManager.stories.d.ts +21 -0
- package/dist/stories/Page.d.ts +3 -0
- package/dist/stories/Page.stories.d.ts +13 -0
- package/dist/stories/Upload.d.ts +2 -0
- package/dist/stories/Upload.stories.d.ts +20 -0
- package/dist/stories/root/index.d.ts +6 -0
- package/dist/switch/index.d.ts +4 -0
- package/dist/switch/styled.d.ts +6 -0
- package/dist/tinyscrollbar/index.d.ts +7 -0
- package/dist/tinyscrollbar/scroll.styled.d.ts +3 -0
- package/dist/tinyscrollbar/styled.components.d.ts +7 -0
- package/dist/types/AccordionItemProps.d.ts +8 -0
- package/dist/types/AccordionProps.d.ts +12 -0
- package/dist/types/AccordionSubMenuProps.d.ts +17 -0
- package/dist/types/AlertProps.d.ts +11 -0
- package/dist/types/ButtonProps.d.ts +41 -0
- package/dist/types/CheckboxProps.d.ts +38 -0
- package/dist/types/ChildrenProps.d.ts +1 -0
- package/dist/types/FormProps.d.ts +50 -0
- package/dist/types/ITDImperativeFuncProps.d.ts +10 -0
- package/dist/types/InputProps.d.ts +33 -0
- package/dist/types/ModalProps.d.ts +190 -0
- package/dist/types/NotificationsProps.d.ts +9 -0
- package/dist/types/SelectProps.d.ts +25 -0
- package/dist/types/SingleQueryProps.d.ts +6 -0
- package/dist/types/SwitchProps.d.ts +10 -0
- package/dist/types/UploadProps.d.ts +41 -0
- package/dist/upload/index.d.ts +14 -0
- package/dist/upload/styled.d.ts +40 -0
- package/package.json +183 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1120 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import react__default, { MutableRefObject, RefObject, ForwardRefExoticComponent, PropsWithoutRef, RefAttributes, FunctionComponent, FocusEventHandler, KeyboardEvent, ReactElement, MouseEvent } 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 { ModalState as ModalState$1, FormValidationTypes } from 'enums/enum';
|
|
8
|
+
import { ModalProps as ModalProps$1 } from 'types/ModalProps';
|
|
9
|
+
import { ChildrenProps as ChildrenProps$2 } from 'types/ChildrenProps.js';
|
|
10
|
+
|
|
11
|
+
type ITDContextType = {
|
|
12
|
+
theme: string;
|
|
13
|
+
brokenImage: string;
|
|
14
|
+
dummyTeamImage: string;
|
|
15
|
+
dateFormat: string;
|
|
16
|
+
language: string;
|
|
17
|
+
locale: string;
|
|
18
|
+
changeTheme: (value: string) => void;
|
|
19
|
+
changeBrokenImage: (value: string) => void;
|
|
20
|
+
changeDummyTeamImage: (value: string) => void;
|
|
21
|
+
changeDateFormat: (value: string) => void;
|
|
22
|
+
changeLocale: (value: string) => void;
|
|
23
|
+
changeLanguage: (value: string) => void;
|
|
24
|
+
};
|
|
25
|
+
type ITDProviderProps = {
|
|
26
|
+
theme: string;
|
|
27
|
+
children: ChildrenProps$1;
|
|
28
|
+
};
|
|
29
|
+
declare const ITDContext: react.Context<ITDContextType>;
|
|
30
|
+
declare const ITDProvider: (props: ITDProviderProps) => react_jsx_runtime.JSX.Element;
|
|
31
|
+
|
|
32
|
+
declare function DetermineNewHeight(originalHeight: number, originalWidth: number, newWidth: number): number;
|
|
33
|
+
|
|
34
|
+
declare function DetermineNewWidth(originalHeight: number, originalWidth: number, newHeight: number): number;
|
|
35
|
+
|
|
36
|
+
declare function FindSelector(searchClassName: string): boolean;
|
|
37
|
+
|
|
38
|
+
declare function GetCountryCodeByCurrencyCode(currency?: string): "en" | "tr" | "eu" | "uk";
|
|
39
|
+
|
|
40
|
+
declare function GetCountryCodeByLanguage(language: string): "tur" | "usa" | "language_not_found";
|
|
41
|
+
|
|
42
|
+
declare function ConvertCurrency(balance: number, currency: string): string;
|
|
43
|
+
|
|
44
|
+
declare function GetByCurrency(value: number, symbol?: boolean, currency?: string): string | number;
|
|
45
|
+
|
|
46
|
+
declare function GetCurrencyFormat(value: string, currency?: string): string;
|
|
47
|
+
|
|
48
|
+
declare function GetCurrencySymbol(currency?: string): "₺" | "$" | "€" | "?";
|
|
49
|
+
|
|
50
|
+
declare function GetDecimalByCurrency(currency?: string): "." | ",";
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
declare function AddDefaultThemeStyle(): void;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @param {*} theme
|
|
60
|
+
*/
|
|
61
|
+
declare function UpdateThemeStyle(theme: string): void;
|
|
62
|
+
|
|
63
|
+
declare function IsValidJSON(item: string | {}): boolean;
|
|
64
|
+
|
|
65
|
+
declare function AddZero(num: string): string;
|
|
66
|
+
|
|
67
|
+
declare function RemoveUnits(value: string): number;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Returns an array with arrays of the given size.
|
|
71
|
+
*
|
|
72
|
+
* @param array {Array} array to split
|
|
73
|
+
* @param chunk_size {Integer} Size of every group
|
|
74
|
+
*/
|
|
75
|
+
declare function ChunkArray(array: [], chunk_size: number): never[];
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* @param text
|
|
80
|
+
* @param entryType
|
|
81
|
+
* @returns
|
|
82
|
+
*/
|
|
83
|
+
declare function FileChecker(text?: string, entryType?: string): boolean;
|
|
84
|
+
|
|
85
|
+
declare function CheckFileURL(url: string): false | Promise<boolean>;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
*
|
|
89
|
+
*
|
|
90
|
+
*
|
|
91
|
+
*/
|
|
92
|
+
declare function UniUpperCase(value?: string, lang?: string): string;
|
|
93
|
+
|
|
94
|
+
declare function FormatBytes(bytes: number, decimals?: number): string;
|
|
95
|
+
|
|
96
|
+
declare function GetTypeByFileType(type: FileTypes): "" | FileExtensions;
|
|
97
|
+
|
|
98
|
+
declare function Wait(milliseconds: number): Promise<unknown>;
|
|
99
|
+
|
|
100
|
+
type Nullable<T> = T | null;
|
|
101
|
+
type THandler = Nullable<(value: string | null) => void>;
|
|
102
|
+
declare const useReCaptcha: (handler: THandler) => {
|
|
103
|
+
loadReCaptcha: (key: string) => void;
|
|
104
|
+
executeReCaptcha: () => void;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
*
|
|
109
|
+
* This hook acting like a class constructor.
|
|
110
|
+
*
|
|
111
|
+
* @param {*} callBack
|
|
112
|
+
*
|
|
113
|
+
* @returns
|
|
114
|
+
*
|
|
115
|
+
*/
|
|
116
|
+
declare const useConstructor: (callBack?: () => void) => void;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
*
|
|
120
|
+
* ADD EXTERNAL CSS
|
|
121
|
+
*
|
|
122
|
+
* Dinamik css dosyalarını yüklemek için kullanılır. Eğer yüklenecek
|
|
123
|
+
* olan css dosyası daha önce eklenmiş ise tekrar yüklemez. Bunu yükleyen
|
|
124
|
+
* component ekrandan silinirse yüklediği yazı da silinir.
|
|
125
|
+
*
|
|
126
|
+
* @param link string
|
|
127
|
+
* @param temporary boolean
|
|
128
|
+
*
|
|
129
|
+
*/
|
|
130
|
+
declare const useAddExternalCSS: (link: string, temporary?: boolean) => void;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
*
|
|
134
|
+
*
|
|
135
|
+
*
|
|
136
|
+
* @param {*} id
|
|
137
|
+
* @param {*} style
|
|
138
|
+
* @param {*} handler
|
|
139
|
+
*/
|
|
140
|
+
declare const useCreateDynamicStyle: (style: {}, handler: (id: string) => void, id?: string) => void;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
*
|
|
144
|
+
* styled-component <> gibi kullanılmadığı zaman class içeriğini
|
|
145
|
+
* yazmıyor. Bu kod bunu çözüyor. styled class'ının değerini id'si
|
|
146
|
+
* ile birlikte alıp head'e kayıt ediyor ve component ekrandan
|
|
147
|
+
* kaldırıldığında kendini siliyor.
|
|
148
|
+
*
|
|
149
|
+
* @param styled
|
|
150
|
+
* @param handler
|
|
151
|
+
*/
|
|
152
|
+
declare const useCreateStyledStyle: (styled: IStyledComponent<any, any>, handler: (id: string) => void) => void;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
*
|
|
156
|
+
* document objesine event listener ekler ve ref dışarısında
|
|
157
|
+
* herhangi bir alana tıklanıldığında ref'in kapatılmasını sağlar.
|
|
158
|
+
*
|
|
159
|
+
* @param ref
|
|
160
|
+
* @param handler
|
|
161
|
+
*
|
|
162
|
+
*/
|
|
163
|
+
declare const useOnClickOutside: (ref: MutableRefObject<HTMLDivElement | null>, handler: (event: PointerEvent) => void) => void;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
*
|
|
167
|
+
* document objesine event listener ekler ve ESC tuşuna basıldığında
|
|
168
|
+
* çağrılır.
|
|
169
|
+
*
|
|
170
|
+
* @param {*} handler
|
|
171
|
+
*
|
|
172
|
+
*/
|
|
173
|
+
declare const useOnESCKeyDown: (handler: (event: Event) => void) => void;
|
|
174
|
+
|
|
175
|
+
declare const useSingleQuery: () => SingleQueryProps;
|
|
176
|
+
|
|
177
|
+
declare const useMultiQuery: () => {
|
|
178
|
+
set: (queries?: {
|
|
179
|
+
type: string;
|
|
180
|
+
value: string;
|
|
181
|
+
}[]) => void;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
*
|
|
186
|
+
* window objesine event listener ekler ve
|
|
187
|
+
* sayfa resize olduğunda çağrılır.
|
|
188
|
+
*
|
|
189
|
+
* @param {*} handler
|
|
190
|
+
*
|
|
191
|
+
*/
|
|
192
|
+
declare const useOnResize: (handler: (event: Event) => void) => void;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
*
|
|
196
|
+
* window objesine event listener ekler ve
|
|
197
|
+
* kullanıcı online ve offline olduğunda çağrılır.
|
|
198
|
+
*
|
|
199
|
+
* @param {*} handler
|
|
200
|
+
*
|
|
201
|
+
*/
|
|
202
|
+
declare const useConnectionStatus: (handler: (event: Event) => void) => void;
|
|
203
|
+
|
|
204
|
+
declare const useComponentSize: (comRef: RefObject<any>) => {
|
|
205
|
+
width: number;
|
|
206
|
+
height: number;
|
|
207
|
+
}[];
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
*
|
|
211
|
+
* useCoreFetch
|
|
212
|
+
* --
|
|
213
|
+
*
|
|
214
|
+
* All API routes within the application pass through this class. It filters all
|
|
215
|
+
* responses returned from the API and processes them to their expected state.
|
|
216
|
+
* Then, it returns the success or failure status.
|
|
217
|
+
*
|
|
218
|
+
* Additionally, it retrieves and adds additional information such as language,
|
|
219
|
+
* token, currency, etc., from the user's cookie to API calls.
|
|
220
|
+
*
|
|
221
|
+
* @param changeLogout The function used to log out the user when called from places where
|
|
222
|
+
* context data such as React.Portal cannot be accessed needs to be passed.
|
|
223
|
+
* @param isUserLoggedOut User's logout information.
|
|
224
|
+
*
|
|
225
|
+
* @returns
|
|
226
|
+
*
|
|
227
|
+
*/
|
|
228
|
+
declare const useCoreFetch: () => {
|
|
229
|
+
fetch: ({ action, requestMethod, addOrigin, params, queries, headers, cancelable, onFetched, onError, onCanceled, onProgress, }: {
|
|
230
|
+
action: string;
|
|
231
|
+
requestMethod?: string | undefined;
|
|
232
|
+
addOrigin?: boolean | undefined;
|
|
233
|
+
params?: {} | undefined;
|
|
234
|
+
queries?: {} | undefined;
|
|
235
|
+
headers?: {} | undefined;
|
|
236
|
+
cancelable?: boolean | undefined;
|
|
237
|
+
onFetched?: ((result: any) => void) | undefined;
|
|
238
|
+
onError?: ((err: string, code: number) => void) | undefined;
|
|
239
|
+
onCanceled?: ((message: Cancel) => void) | undefined;
|
|
240
|
+
onProgress?: ((event: AxiosProgressEvent) => void) | undefined;
|
|
241
|
+
}) => Promise<void>;
|
|
242
|
+
cancel: () => void;
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
declare const Lock: ({ className, height, width }: {
|
|
246
|
+
className: any;
|
|
247
|
+
height: any;
|
|
248
|
+
width: any;
|
|
249
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
250
|
+
|
|
251
|
+
declare const Arrow: ({ className, height, width }: {
|
|
252
|
+
className?: string | undefined;
|
|
253
|
+
height?: number | undefined;
|
|
254
|
+
width?: number | undefined;
|
|
255
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
256
|
+
|
|
257
|
+
declare const Upload$1: ({ className, height, width }: {
|
|
258
|
+
className?: string | undefined;
|
|
259
|
+
height?: number | undefined;
|
|
260
|
+
width?: number | undefined;
|
|
261
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
262
|
+
|
|
263
|
+
declare const BackToTop: ({ className, height, width }: {
|
|
264
|
+
className?: string | undefined;
|
|
265
|
+
height: any;
|
|
266
|
+
width: any;
|
|
267
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
268
|
+
|
|
269
|
+
declare const Checkmark: ({ className, height, width }: {
|
|
270
|
+
className: any;
|
|
271
|
+
height: any;
|
|
272
|
+
width: any;
|
|
273
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
274
|
+
|
|
275
|
+
declare const InlineSelectArrow: ({ className, height, width }: {
|
|
276
|
+
className: any;
|
|
277
|
+
height: any;
|
|
278
|
+
width: any;
|
|
279
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
280
|
+
|
|
281
|
+
declare const Trash: ({ className, height, width }: {
|
|
282
|
+
className?: string | undefined;
|
|
283
|
+
height?: number | undefined;
|
|
284
|
+
width?: number | undefined;
|
|
285
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
286
|
+
|
|
287
|
+
declare const ZoomIn: ({ className, height, width }: {
|
|
288
|
+
className?: string | undefined;
|
|
289
|
+
height?: number | undefined;
|
|
290
|
+
width?: number | undefined;
|
|
291
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
292
|
+
|
|
293
|
+
declare const ZoomOut: ({ className, height, width }: {
|
|
294
|
+
className?: string | undefined;
|
|
295
|
+
height?: number | undefined;
|
|
296
|
+
width?: number | undefined;
|
|
297
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
298
|
+
|
|
299
|
+
declare const Picture: ({ className, height, width }: {
|
|
300
|
+
className?: string | undefined;
|
|
301
|
+
height?: number | undefined;
|
|
302
|
+
width?: number | undefined;
|
|
303
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
304
|
+
|
|
305
|
+
type OptionsProps = {
|
|
306
|
+
icon?: string;
|
|
307
|
+
image?: string;
|
|
308
|
+
value?: string;
|
|
309
|
+
mode?: string;
|
|
310
|
+
checked?: false;
|
|
311
|
+
onChange?: (value: string, checked: boolean, children: ChildrenProps$1) => null;
|
|
312
|
+
children?: ChildrenProps$1;
|
|
313
|
+
};
|
|
314
|
+
declare const _default$3: react.MemoExoticComponent<{
|
|
315
|
+
({ icon, image, value, mode, checked, onChange, children }: OptionsProps): react_jsx_runtime.JSX.Element;
|
|
316
|
+
displayName: string;
|
|
317
|
+
}>;
|
|
318
|
+
|
|
319
|
+
type SelectSubComponentProps = {
|
|
320
|
+
Option: typeof _default$3;
|
|
321
|
+
};
|
|
322
|
+
type SelectComponentProps = ForwardRefExoticComponent<PropsWithoutRef<SelectProps> & RefAttributes<ITDImperativeFuncProps>> & SelectSubComponentProps;
|
|
323
|
+
declare const Select: SelectComponentProps;
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
*
|
|
327
|
+
* FORM FIELD GROUP
|
|
328
|
+
*
|
|
329
|
+
* @param className
|
|
330
|
+
* @param children
|
|
331
|
+
* @returns
|
|
332
|
+
*
|
|
333
|
+
*/
|
|
334
|
+
type GroupProps = {
|
|
335
|
+
className?: string;
|
|
336
|
+
gap?: number;
|
|
337
|
+
children?: ChildrenProps$1;
|
|
338
|
+
};
|
|
339
|
+
declare function Group({ gap, className, children }: GroupProps): react_jsx_runtime.JSX.Element;
|
|
340
|
+
|
|
341
|
+
type ControlProps = {
|
|
342
|
+
className?: string;
|
|
343
|
+
children?: ChildrenProps$1;
|
|
344
|
+
};
|
|
345
|
+
declare function Control({ className, children }: ControlProps): react_jsx_runtime.JSX.Element;
|
|
346
|
+
|
|
347
|
+
type ItemProps = {
|
|
348
|
+
name: string;
|
|
349
|
+
label?: string;
|
|
350
|
+
placeholder?: string;
|
|
351
|
+
error?: string;
|
|
352
|
+
rules?: FormRuleProps[];
|
|
353
|
+
mask?: string | null;
|
|
354
|
+
locked?: boolean;
|
|
355
|
+
dependency?: string;
|
|
356
|
+
reset?: [];
|
|
357
|
+
query?: string;
|
|
358
|
+
children: ChildrenProps$1;
|
|
359
|
+
};
|
|
360
|
+
declare const Item$1: react.ForwardRefExoticComponent<ItemProps & react.RefAttributes<ITDImperativeFuncProps>>;
|
|
361
|
+
|
|
362
|
+
type FormContextType = {
|
|
363
|
+
register: (item: FormItemProps) => void;
|
|
364
|
+
hasField: (name: string) => boolean;
|
|
365
|
+
getValues: () => {};
|
|
366
|
+
getFieldValue: (name: string) => FormValueProps;
|
|
367
|
+
getFieldValueByName: (name: string) => FormValueProps;
|
|
368
|
+
getFieldInstance: (name: string) => ITDImperativeFuncProps | null;
|
|
369
|
+
getFields: () => {
|
|
370
|
+
[key: string]: FormItemProps;
|
|
371
|
+
};
|
|
372
|
+
getFieldsInstance: () => {};
|
|
373
|
+
setName: (name: string) => void;
|
|
374
|
+
setInitialValues: (initialFields: {}, update?: boolean, validation?: boolean) => {};
|
|
375
|
+
setInvalidField: (name: string, message: string) => void;
|
|
376
|
+
setInvalidFields: (names: [], message: string) => void;
|
|
377
|
+
setFieldValue: (name: string, value: FormValueProps) => void;
|
|
378
|
+
setFieldValueByName: (name: string, value: FormValueProps, update: boolean, validation: boolean) => void;
|
|
379
|
+
setFieldError: (name: string, message: string, validation?: boolean) => void;
|
|
380
|
+
removeFieldError: (name: string) => void;
|
|
381
|
+
updateField: (name: string, value: FormValueProps, update: boolean, valid: boolean) => void;
|
|
382
|
+
isFormValid: () => boolean;
|
|
383
|
+
isFieldsValid: (names: string[]) => boolean;
|
|
384
|
+
isFieldValid: (name: string) => boolean;
|
|
385
|
+
resetFields: (update: boolean, validation: boolean) => void;
|
|
386
|
+
removeFields: () => void;
|
|
387
|
+
formId: string;
|
|
388
|
+
updated: {};
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
type FormStoreProps = {
|
|
392
|
+
name: string;
|
|
393
|
+
onUpdate?: (values: {}) => void;
|
|
394
|
+
onFieldUpdate?: (update: FieldUpdateProps) => void;
|
|
395
|
+
onReset?: () => void;
|
|
396
|
+
useQueryString?: boolean;
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
type FormSubComponentProps$1 = {
|
|
400
|
+
Item: typeof Item$1;
|
|
401
|
+
Group: typeof Group;
|
|
402
|
+
Control: typeof Control;
|
|
403
|
+
useForm: () => FormContextType;
|
|
404
|
+
useFormAPI: FormStoreProps;
|
|
405
|
+
};
|
|
406
|
+
type FormComponentProps = ForwardRefExoticComponent<PropsWithoutRef<FormProps> & RefAttributes<FormContextType>> & FormSubComponentProps$1;
|
|
407
|
+
declare const Form: FormComponentProps;
|
|
408
|
+
|
|
409
|
+
declare const CheckboxGroup: react.ForwardRefExoticComponent<CheckboxGroupProps & react.RefAttributes<ITDImperativeFuncProps>>;
|
|
410
|
+
|
|
411
|
+
type CheckboxSubComponentProps = {
|
|
412
|
+
Group: typeof CheckboxGroup;
|
|
413
|
+
};
|
|
414
|
+
type CheckboxComponentProps = ForwardRefExoticComponent<PropsWithoutRef<CheckboxProps> & RefAttributes<ITDImperativeFuncProps>> & CheckboxSubComponentProps;
|
|
415
|
+
declare const Checkbox: CheckboxComponentProps;
|
|
416
|
+
|
|
417
|
+
declare function SubMenu({ id, link, icon, title, isSelected, useLink, onlyOne, subMenuLinkArrow, subMenuHeight, itemHeight, iconSize, arrowSize, onChange, children }: AccordionSubMenuProps): react_jsx_runtime.JSX.Element;
|
|
418
|
+
|
|
419
|
+
declare const Item: ({ link, itemHeight, arrowSize, active, children }: AccordionItemProps) => react_jsx_runtime.JSX.Element;
|
|
420
|
+
|
|
421
|
+
type AccordionMenuSubComponents = {
|
|
422
|
+
SubMenu: typeof SubMenu;
|
|
423
|
+
Item: typeof Item;
|
|
424
|
+
};
|
|
425
|
+
type AccordionMenuProps = AccordionProps & {
|
|
426
|
+
className?: string;
|
|
427
|
+
};
|
|
428
|
+
declare const Accordion: FunctionComponent<AccordionMenuProps> & AccordionMenuSubComponents;
|
|
429
|
+
|
|
430
|
+
declare const Calendar: react__default.ForwardRefExoticComponent<react__default.RefAttributes<any>>;
|
|
431
|
+
|
|
432
|
+
declare const DatePicker: react__default.ForwardRefExoticComponent<react__default.RefAttributes<any>>;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* https://github.com/sanniassin/react-input-mask
|
|
436
|
+
* http://sanniassin.github.io/react-input-mask/demo.html
|
|
437
|
+
* https://dev.to/adrianbdesigns/let-s-create-a-floating-label-input-with-html-and-css-only-4mo8
|
|
438
|
+
*/
|
|
439
|
+
declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<ITDImperativeFuncProps>>;
|
|
440
|
+
|
|
441
|
+
declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<ITDImperativeFuncProps>>;
|
|
442
|
+
|
|
443
|
+
declare const Tooltip: react__default.ForwardRefExoticComponent<react__default.RefAttributes<any>>;
|
|
444
|
+
|
|
445
|
+
declare function Panel({ id, link, icon, title, hasOpen, useLink, onChange, children }: {
|
|
446
|
+
id?: string | undefined;
|
|
447
|
+
link?: string | undefined;
|
|
448
|
+
icon?: string | undefined;
|
|
449
|
+
title?: string | undefined;
|
|
450
|
+
hasOpen?: boolean | undefined;
|
|
451
|
+
useLink?: boolean | undefined;
|
|
452
|
+
onChange?: null | undefined;
|
|
453
|
+
children?: null | undefined;
|
|
454
|
+
}): react_jsx_runtime.JSX.Element;
|
|
455
|
+
|
|
456
|
+
declare function Collapse({ useLink, children }: {
|
|
457
|
+
useLink?: boolean | undefined;
|
|
458
|
+
children: any;
|
|
459
|
+
}): react_jsx_runtime.JSX.Element;
|
|
460
|
+
declare namespace Collapse {
|
|
461
|
+
export { Panel };
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
type ModalContextType = {
|
|
465
|
+
/**
|
|
466
|
+
* Opens a new modal with the provided information of the modal to be opened.
|
|
467
|
+
*
|
|
468
|
+
* @param data Contains the desired parameters for opening a new modal `ModalProps`.
|
|
469
|
+
* @returns
|
|
470
|
+
*/
|
|
471
|
+
showModal: (data: ModalProps$1) => void;
|
|
472
|
+
/**
|
|
473
|
+
* Dismisses the currently open modal with the ID of the modal to be closed.
|
|
474
|
+
*
|
|
475
|
+
* @param id ID of the modal to be dismissed.
|
|
476
|
+
* @returns
|
|
477
|
+
*/
|
|
478
|
+
removeModal: (id: string) => void;
|
|
479
|
+
/**
|
|
480
|
+
*
|
|
481
|
+
* @returns
|
|
482
|
+
*/
|
|
483
|
+
removeAllModals: () => void;
|
|
484
|
+
/**
|
|
485
|
+
* Triggered whenever any event related to modals occurs.
|
|
486
|
+
*/
|
|
487
|
+
modalEvent: {
|
|
488
|
+
event: ModalState$1;
|
|
489
|
+
id: string;
|
|
490
|
+
};
|
|
491
|
+
/**
|
|
492
|
+
* Returns whether a modal is visible or not.
|
|
493
|
+
*
|
|
494
|
+
* @param id The visibility information of the desired modal with its ID.
|
|
495
|
+
* @returns
|
|
496
|
+
*/
|
|
497
|
+
isVisible: (id: string) => boolean;
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
declare const ModalManager: {
|
|
501
|
+
useModal: () => ModalContextType;
|
|
502
|
+
};
|
|
503
|
+
|
|
504
|
+
type NotificationContextType = {
|
|
505
|
+
addNotification: (notification: NotificationsProps) => void;
|
|
506
|
+
removeNotification: (id: string) => void;
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
declare const Notification: {
|
|
510
|
+
useNotifications: () => NotificationContextType;
|
|
511
|
+
};
|
|
512
|
+
|
|
513
|
+
declare const _default$2: react__default.MemoExoticComponent<react__default.ForwardRefExoticComponent<react__default.RefAttributes<any>>>;
|
|
514
|
+
|
|
515
|
+
declare function Button$1(props: any): react_jsx_runtime.JSX.Element;
|
|
516
|
+
|
|
517
|
+
declare function Radio(): null;
|
|
518
|
+
declare namespace Radio {
|
|
519
|
+
export { _default$2 as Group };
|
|
520
|
+
export { Button$1 as Button };
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
declare const _default$1: react__default.MemoExoticComponent<({ value, checked, single, onChange, children }: {
|
|
524
|
+
value?: string | undefined;
|
|
525
|
+
checked?: boolean | undefined;
|
|
526
|
+
single?: boolean | undefined;
|
|
527
|
+
onChange?: null | undefined;
|
|
528
|
+
children?: null | undefined;
|
|
529
|
+
}) => react_jsx_runtime.JSX.Element>;
|
|
530
|
+
|
|
531
|
+
declare function InlineSelect({ label, value, children, single, minWidth, className, onChange }: {
|
|
532
|
+
label?: string | undefined;
|
|
533
|
+
value?: any[] | undefined;
|
|
534
|
+
children?: null | undefined;
|
|
535
|
+
single?: boolean | undefined;
|
|
536
|
+
minWidth?: number | undefined;
|
|
537
|
+
className?: string | undefined;
|
|
538
|
+
onChange?: null | undefined;
|
|
539
|
+
}): react_jsx_runtime.JSX.Element;
|
|
540
|
+
declare namespace InlineSelect {
|
|
541
|
+
export { _default$1 as Option };
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
declare const _default: react__default.MemoExoticComponent<(props: any) => react_jsx_runtime.JSX.Element>;
|
|
545
|
+
|
|
546
|
+
declare namespace ConsoleLog {
|
|
547
|
+
export { single };
|
|
548
|
+
export { double };
|
|
549
|
+
export { table };
|
|
550
|
+
}
|
|
551
|
+
declare function single(message: any, type?: string): void;
|
|
552
|
+
declare function double(title: any, message: any, type?: string): void;
|
|
553
|
+
declare function table(data: any): void;
|
|
554
|
+
|
|
555
|
+
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;
|
|
556
|
+
|
|
557
|
+
declare const Alert: {
|
|
558
|
+
({ type, size, title, className, children }: AlertProps): react_jsx_runtime.JSX.Element;
|
|
559
|
+
displayName: string;
|
|
560
|
+
};
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
*
|
|
564
|
+
* UPLOAD
|
|
565
|
+
* --
|
|
566
|
+
*
|
|
567
|
+
*
|
|
568
|
+
*
|
|
569
|
+
* @returns
|
|
570
|
+
*
|
|
571
|
+
*/
|
|
572
|
+
declare const Upload: react.ForwardRefExoticComponent<UploadProps & react.RefAttributes<ITDImperativeFuncProps>>;
|
|
573
|
+
|
|
574
|
+
type ResultProps = {
|
|
575
|
+
image: string;
|
|
576
|
+
title: string;
|
|
577
|
+
description: string;
|
|
578
|
+
type?: string;
|
|
579
|
+
extra?: JSX.Element | null;
|
|
580
|
+
footer?: JSX.Element | null;
|
|
581
|
+
fill?: boolean;
|
|
582
|
+
autoCenter?: boolean;
|
|
583
|
+
};
|
|
584
|
+
declare const Result: {
|
|
585
|
+
({ image, title, description, extra, footer, type, fill, autoCenter }: ResultProps): react_jsx_runtime.JSX.Element;
|
|
586
|
+
displayName: string;
|
|
587
|
+
};
|
|
588
|
+
|
|
589
|
+
declare const ALink: (props: any) => react_jsx_runtime.JSX.Element;
|
|
590
|
+
|
|
591
|
+
interface ISpin {
|
|
592
|
+
updating?: boolean;
|
|
593
|
+
size?: number;
|
|
594
|
+
className?: string;
|
|
595
|
+
children?: any;
|
|
596
|
+
}
|
|
597
|
+
declare const Spin: ({ updating, size, className, children }: ISpin) => react_jsx_runtime.JSX.Element | null;
|
|
598
|
+
|
|
599
|
+
declare function BackTop(props: any): react_jsx_runtime.JSX.Element;
|
|
600
|
+
|
|
601
|
+
declare function Status(props: any): react_jsx_runtime.JSX.Element;
|
|
602
|
+
|
|
603
|
+
type TinyScrollbarProps = {
|
|
604
|
+
className: string;
|
|
605
|
+
children: ChildrenProps$2;
|
|
606
|
+
};
|
|
607
|
+
declare function TinyScrollbar({ className, children }: TinyScrollbarProps): react_jsx_runtime.JSX.Element;
|
|
608
|
+
|
|
609
|
+
type ChildrenProps = string | JSX.Element | JSX.Element[] | null;
|
|
610
|
+
|
|
611
|
+
type AccordionProps = {
|
|
612
|
+
useLink?: boolean;
|
|
613
|
+
onlyOne?: boolean;
|
|
614
|
+
subMenuLinkArrow?: boolean;
|
|
615
|
+
subMenuHeight?: number;
|
|
616
|
+
itemHeight?: number;
|
|
617
|
+
iconSize?: number;
|
|
618
|
+
arrowSize?: number;
|
|
619
|
+
onChange?: null | ((id: string) => void);
|
|
620
|
+
children: ChildrenProps;
|
|
621
|
+
};
|
|
622
|
+
|
|
623
|
+
type AccordionSubMenuProps = {
|
|
624
|
+
id: string;
|
|
625
|
+
link: string;
|
|
626
|
+
title: string;
|
|
627
|
+
icon?: string | JSX.Element;
|
|
628
|
+
isSelected?: boolean;
|
|
629
|
+
useLink?: boolean;
|
|
630
|
+
onlyOne?: boolean;
|
|
631
|
+
subMenuLinkArrow?: boolean;
|
|
632
|
+
subMenuHeight?: number;
|
|
633
|
+
itemHeight?: number;
|
|
634
|
+
iconSize?: number;
|
|
635
|
+
arrowSize?: number;
|
|
636
|
+
onChange?: (id: string) => void;
|
|
637
|
+
children?: ChildrenProps;
|
|
638
|
+
};
|
|
639
|
+
|
|
640
|
+
type AccordionItemProps = {
|
|
641
|
+
link?: string;
|
|
642
|
+
itemHeight?: number;
|
|
643
|
+
arrowSize?: number;
|
|
644
|
+
active?: boolean;
|
|
645
|
+
children?: null | ChildrenProps;
|
|
646
|
+
};
|
|
647
|
+
|
|
648
|
+
type InputProps = {
|
|
649
|
+
id?: string;
|
|
650
|
+
placeholder?: string;
|
|
651
|
+
value?: string;
|
|
652
|
+
defaultValue?: string;
|
|
653
|
+
type?: string;
|
|
654
|
+
className?: string;
|
|
655
|
+
size?: string;
|
|
656
|
+
variant?: string;
|
|
657
|
+
prefix?: ChildrenProps;
|
|
658
|
+
suffix?: ChildrenProps;
|
|
659
|
+
addonBefore?: ChildrenProps;
|
|
660
|
+
addonAfter?: ChildrenProps;
|
|
661
|
+
locked?: ChildrenProps | boolean;
|
|
662
|
+
status?: ChildrenProps;
|
|
663
|
+
maxLength?: number;
|
|
664
|
+
disabled?: boolean;
|
|
665
|
+
floating?: boolean;
|
|
666
|
+
autoComplete?: boolean;
|
|
667
|
+
keepFocus?: boolean;
|
|
668
|
+
focusRef?: null | MutableRefObject<HTMLDivElement>;
|
|
669
|
+
mask?: null | string;
|
|
670
|
+
allowEmptyFormatting?: null | boolean;
|
|
671
|
+
onChange?: ((value: any) => void) | null;
|
|
672
|
+
onUpdate?: ((value: any, update: any, validation: boolean) => void) | null;
|
|
673
|
+
onFocus?: ((event: any) => void) | null;
|
|
674
|
+
onBlur?: ((event: FocusEventHandler<HTMLInputElement>) => void) | null;
|
|
675
|
+
onPressEnter?: ((event: KeyboardEvent) => void) | null;
|
|
676
|
+
onKeyDown?: ((event: KeyboardEvent) => void) | null;
|
|
677
|
+
children?: ChildrenProps;
|
|
678
|
+
};
|
|
679
|
+
|
|
680
|
+
type SelectProps = {
|
|
681
|
+
defaultValue?: string | number;
|
|
682
|
+
value?: string | number;
|
|
683
|
+
label?: string | number;
|
|
684
|
+
position?: string;
|
|
685
|
+
direction?: string;
|
|
686
|
+
mode?: string;
|
|
687
|
+
size?: string;
|
|
688
|
+
variant?: string;
|
|
689
|
+
className?: string;
|
|
690
|
+
placeholder?: string;
|
|
691
|
+
icon?: string;
|
|
692
|
+
image?: string;
|
|
693
|
+
disabled?: boolean;
|
|
694
|
+
locked?: boolean;
|
|
695
|
+
floating?: boolean;
|
|
696
|
+
children?: ReactElement<SelectOptionProps> | Array<ReactElement<SelectOptionProps>>;
|
|
697
|
+
onChange?: ((value: any) => void) | null;
|
|
698
|
+
onUpdate?: ((value: any, update: any, validation: boolean) => void) | null;
|
|
699
|
+
};
|
|
700
|
+
type SelectOptionProps = {
|
|
701
|
+
value: string;
|
|
702
|
+
text: string;
|
|
703
|
+
};
|
|
704
|
+
|
|
705
|
+
type CheckboxProps = {
|
|
706
|
+
id?: string;
|
|
707
|
+
value?: string | number | boolean;
|
|
708
|
+
checked?: boolean;
|
|
709
|
+
disabled?: boolean;
|
|
710
|
+
indeterminate?: boolean;
|
|
711
|
+
className?: string;
|
|
712
|
+
children?: ChildrenProps;
|
|
713
|
+
onChange?: ((event: CheckboxEvent) => void);
|
|
714
|
+
onUpdate?: ((value: any, update: any, validation: boolean) => void);
|
|
715
|
+
};
|
|
716
|
+
type CheckboxGroupProps = {
|
|
717
|
+
value?: (string | number | boolean)[];
|
|
718
|
+
defaultValue?: (string | number)[];
|
|
719
|
+
options?: GroupCheckboxOptionType[];
|
|
720
|
+
disabled?: boolean;
|
|
721
|
+
className?: string;
|
|
722
|
+
children?: ChildrenProps | ReactElement<CheckboxProps> | Array<ReactElement<CheckboxProps>>;
|
|
723
|
+
selectAll?: (value: boolean) => void;
|
|
724
|
+
onChange?: ((values: (string | number | boolean)[]) => void);
|
|
725
|
+
onUpdate?: ((value: (string | number | boolean)[], update: any, validation: boolean) => void);
|
|
726
|
+
};
|
|
727
|
+
type GroupCheckboxOptionType = {
|
|
728
|
+
label: string;
|
|
729
|
+
value: string | number | boolean;
|
|
730
|
+
disabled?: boolean;
|
|
731
|
+
};
|
|
732
|
+
type CheckboxEvent = {
|
|
733
|
+
checked: boolean;
|
|
734
|
+
value?: string | number | boolean;
|
|
735
|
+
className: string;
|
|
736
|
+
disabled: boolean;
|
|
737
|
+
target: RefObject<HTMLInputElement>;
|
|
738
|
+
stopPropagation: () => void;
|
|
739
|
+
preventDefault: () => void;
|
|
740
|
+
};
|
|
741
|
+
|
|
742
|
+
type ITDImperativeFuncProps = {
|
|
743
|
+
reset: (update?: boolean, validation?: boolean) => void;
|
|
744
|
+
setValue: (value: any, update?: boolean, validation?: boolean) => void;
|
|
745
|
+
getValue: () => any;
|
|
746
|
+
setError: (message: string) => void;
|
|
747
|
+
setFocus?: () => void;
|
|
748
|
+
setDisabled?: (value: boolean) => void;
|
|
749
|
+
forceUpdate?: () => void;
|
|
750
|
+
clear: () => void;
|
|
751
|
+
};
|
|
752
|
+
|
|
753
|
+
type SingleQueryProps = {
|
|
754
|
+
set: (type: string, value: string | string[] | null) => void;
|
|
755
|
+
get: (type: string, _default?: string, _minLength?: number) => string | string[] | null;
|
|
756
|
+
remove: (type: string) => void;
|
|
757
|
+
isEmpty: () => boolean;
|
|
758
|
+
};
|
|
759
|
+
|
|
760
|
+
type ButtonProps = {
|
|
761
|
+
id?: string;
|
|
762
|
+
disabled?: boolean;
|
|
763
|
+
loading?: boolean;
|
|
764
|
+
selected?: boolean;
|
|
765
|
+
strecth?: boolean;
|
|
766
|
+
circle?: boolean;
|
|
767
|
+
justify?: string;
|
|
768
|
+
contentPosition?: ButtonContentPosition;
|
|
769
|
+
type?: ButtonType;
|
|
770
|
+
variant?: ButtonVariant;
|
|
771
|
+
state?: ButtonState;
|
|
772
|
+
size?: ButtonSize;
|
|
773
|
+
icon?: string | ChildrenProps | SVGElement;
|
|
774
|
+
href?: string;
|
|
775
|
+
target?: string;
|
|
776
|
+
className?: string;
|
|
777
|
+
children?: ChildrenProps;
|
|
778
|
+
onClick?: null | ((event: MouseEvent<any>) => void);
|
|
779
|
+
};
|
|
780
|
+
type ButtonType = "button" | "submit" | "reset";
|
|
781
|
+
type ButtonVariant = "default" | "solid" | "filled" | "outline" | "ghost" | "link" | "statable" | "custom";
|
|
782
|
+
type ButtonState = "primary" | "secondary" | "request" | "approve" | "reject" | "pending" | "requested" | string | null;
|
|
783
|
+
type ButtonSize = "x-small" | "small" | "medium" | "default" | "large" | "x-large";
|
|
784
|
+
type ButtonContentPosition = "left" | "right";
|
|
785
|
+
|
|
786
|
+
type FormProps = {
|
|
787
|
+
initialValues?: {};
|
|
788
|
+
children: ChildrenProps$1;
|
|
789
|
+
onReset?: () => void;
|
|
790
|
+
onUpdate?: (values: {}) => void;
|
|
791
|
+
onFinish?: (values: {}) => void;
|
|
792
|
+
onFinishFailed?: (values: {}) => void;
|
|
793
|
+
onValidated?: (validate: boolean) => void;
|
|
794
|
+
onFieldUpdate?: (update: FieldUpdateProps) => void;
|
|
795
|
+
useQueryString?: boolean;
|
|
796
|
+
className?: string;
|
|
797
|
+
ref: RefObject<FormContextType>;
|
|
798
|
+
name: string;
|
|
799
|
+
};
|
|
800
|
+
type FormValueProps = string | number | object | boolean;
|
|
801
|
+
type FieldUpdateProps = {
|
|
802
|
+
name: string;
|
|
803
|
+
value: FormValueProps;
|
|
804
|
+
valid: boolean;
|
|
805
|
+
};
|
|
806
|
+
type FormRuleProps = {
|
|
807
|
+
required?: boolean;
|
|
808
|
+
type?: FormValidationTypes;
|
|
809
|
+
field?: string;
|
|
810
|
+
value?: string | number;
|
|
811
|
+
message?: string;
|
|
812
|
+
};
|
|
813
|
+
type FormItemProps = {
|
|
814
|
+
name: string;
|
|
815
|
+
field: RefObject<ITDImperativeFuncProps>;
|
|
816
|
+
valid: boolean;
|
|
817
|
+
value?: FormValueProps;
|
|
818
|
+
query: string;
|
|
819
|
+
reset: any[];
|
|
820
|
+
error: string;
|
|
821
|
+
};
|
|
822
|
+
type FormSubComponentProps = {
|
|
823
|
+
Item: typeof Item$1;
|
|
824
|
+
Group: typeof Group;
|
|
825
|
+
Control: typeof Control;
|
|
826
|
+
useForm: FormContextType;
|
|
827
|
+
useFormAPI: FormStoreProps;
|
|
828
|
+
};
|
|
829
|
+
|
|
830
|
+
type NotificationsProps = {
|
|
831
|
+
id?: string;
|
|
832
|
+
title: string;
|
|
833
|
+
description: string;
|
|
834
|
+
placement?: string;
|
|
835
|
+
autoHide?: boolean;
|
|
836
|
+
delay?: number;
|
|
837
|
+
type: string;
|
|
838
|
+
};
|
|
839
|
+
|
|
840
|
+
type AlertProps = {
|
|
841
|
+
type?: AlertType;
|
|
842
|
+
size?: AlertSize;
|
|
843
|
+
icon?: string | ChildrenProps | SVGElement;
|
|
844
|
+
title?: string;
|
|
845
|
+
className?: string;
|
|
846
|
+
children?: ChildrenProps;
|
|
847
|
+
};
|
|
848
|
+
type AlertType = "success" | "info" | "warning" | "error";
|
|
849
|
+
type AlertSize = "x-small" | "small" | "medium" | "default" | "large" | "x-large";
|
|
850
|
+
|
|
851
|
+
type SwitchProps = {
|
|
852
|
+
id?: string;
|
|
853
|
+
label?: string;
|
|
854
|
+
checked?: boolean;
|
|
855
|
+
defaultChecked?: boolean;
|
|
856
|
+
loading?: boolean;
|
|
857
|
+
disabled?: boolean;
|
|
858
|
+
onChange?: ((value: any) => void) | null;
|
|
859
|
+
onUpdate?: ((value: any, update: any, validation: boolean) => void) | null;
|
|
860
|
+
};
|
|
861
|
+
|
|
862
|
+
/**
|
|
863
|
+
* #### ModalProps
|
|
864
|
+
*
|
|
865
|
+
* The properties passed when opening a new modal. The `showModal`
|
|
866
|
+
* function requires certain properties to open a new modal.
|
|
867
|
+
*/
|
|
868
|
+
type ModalProps = {
|
|
869
|
+
/**
|
|
870
|
+
* Modal ID. Used for listening to modal events.
|
|
871
|
+
*/
|
|
872
|
+
id?: string;
|
|
873
|
+
/**
|
|
874
|
+
* Modal Title.
|
|
875
|
+
*/
|
|
876
|
+
title?: string;
|
|
877
|
+
/**
|
|
878
|
+
* Modal Width.
|
|
879
|
+
*/
|
|
880
|
+
width?: string | number;
|
|
881
|
+
/**
|
|
882
|
+
* Close modal when overlay is clicked.
|
|
883
|
+
*/
|
|
884
|
+
closeOnClickOutside?: boolean;
|
|
885
|
+
/**
|
|
886
|
+
* Prevents modal from closing when ESC key is pressed.
|
|
887
|
+
*/
|
|
888
|
+
preventESC?: boolean;
|
|
889
|
+
/**
|
|
890
|
+
* Show/hide OK button.
|
|
891
|
+
*/
|
|
892
|
+
showOkButton?: boolean;
|
|
893
|
+
/**
|
|
894
|
+
* Show/hide Cancel button.
|
|
895
|
+
*/
|
|
896
|
+
showCancelButton?: boolean;
|
|
897
|
+
/**
|
|
898
|
+
* Show/hide close button on the top right corner of the modal.
|
|
899
|
+
*/
|
|
900
|
+
showCloseButton?: boolean;
|
|
901
|
+
/**
|
|
902
|
+
* Text for the OK button.
|
|
903
|
+
*/
|
|
904
|
+
okButtonText?: string;
|
|
905
|
+
/**
|
|
906
|
+
* The cancel button props.
|
|
907
|
+
*/
|
|
908
|
+
cancelButtonText?: string;
|
|
909
|
+
/**
|
|
910
|
+
* The ok button props.
|
|
911
|
+
*/
|
|
912
|
+
okButtonProps?: ButtonProps | null;
|
|
913
|
+
/**
|
|
914
|
+
* ModalProps for the Cancel button.
|
|
915
|
+
*/
|
|
916
|
+
cancelButtonProps?: ButtonProps | null;
|
|
917
|
+
/**
|
|
918
|
+
* Custom properties to be passed to the modal.
|
|
919
|
+
*/
|
|
920
|
+
customProps?: {} | any;
|
|
921
|
+
/**
|
|
922
|
+
* Custom context to be passed to the modal.
|
|
923
|
+
*/
|
|
924
|
+
context?: {} | any;
|
|
925
|
+
/**
|
|
926
|
+
* Called when the OK button is clicked. If this
|
|
927
|
+
* function is defined, a ModalEvent is triggered,
|
|
928
|
+
* but the modal does not automatically close.
|
|
929
|
+
* @returns
|
|
930
|
+
*/
|
|
931
|
+
onOk?: (() => boolean | null) | null;
|
|
932
|
+
/**
|
|
933
|
+
* Called when the Cancel button is clicked. If this
|
|
934
|
+
* function is defined, a ModalEvent is triggered,
|
|
935
|
+
* but the modal does not automatically close.
|
|
936
|
+
* @returns
|
|
937
|
+
*/
|
|
938
|
+
onCancel?: (() => boolean | null) | null;
|
|
939
|
+
/**
|
|
940
|
+
* ModalManager can find its own ref, but some libraries
|
|
941
|
+
* (@loadable, React.lazy, etc.) may have their own ref values,
|
|
942
|
+
* which can prevent ModalManager from passing parameters and
|
|
943
|
+
* accessing the actual ref. In such cases, if you want the modal
|
|
944
|
+
* to use a ref, meaning you'll use forwardRef with ModalRefProps
|
|
945
|
+
* inside the modal, you should pass "true".
|
|
946
|
+
*/
|
|
947
|
+
useRef?: boolean;
|
|
948
|
+
/**
|
|
949
|
+
* ModalManager can find its own ref, but some libraries
|
|
950
|
+
* (@loadable, React.lazy, etc.) may have their own ref
|
|
951
|
+
* values, which can prevent ModalManager from passing
|
|
952
|
+
* parameters and accessing the actual ref. In such cases,
|
|
953
|
+
* this value should remain false. You can only set it to
|
|
954
|
+
* "true" in projects where you are sure that all modals
|
|
955
|
+
* are passed as Function Components.
|
|
956
|
+
*/
|
|
957
|
+
checkAutoRef?: boolean;
|
|
958
|
+
/**
|
|
959
|
+
* Content of the modal. Any content you want to display in the modal.
|
|
960
|
+
*/
|
|
961
|
+
content: ChildrenProps;
|
|
962
|
+
/**
|
|
963
|
+
* Adds content before the modal's content data.
|
|
964
|
+
*/
|
|
965
|
+
addContentBefore?: ChildrenProps;
|
|
966
|
+
/**
|
|
967
|
+
* Adds content after the modal's content data.
|
|
968
|
+
*/
|
|
969
|
+
addContentAfter?: ChildrenProps;
|
|
970
|
+
/**
|
|
971
|
+
* The padding of the modal content. The default value is "30px 20px".
|
|
972
|
+
*/
|
|
973
|
+
contentPadding?: string;
|
|
974
|
+
/**
|
|
975
|
+
* The padding before the modal content. The default value is "30px 20px 0".
|
|
976
|
+
*/
|
|
977
|
+
beforeContentPadding?: string;
|
|
978
|
+
/**
|
|
979
|
+
* The padding after the modal content. The default value is "0 20px 30px".
|
|
980
|
+
*/
|
|
981
|
+
afterContentPadding?: string;
|
|
982
|
+
};
|
|
983
|
+
/**
|
|
984
|
+
* #### Modal Content Props
|
|
985
|
+
*
|
|
986
|
+
* These properties can only be accessed from the content data defined within the modal.
|
|
987
|
+
* When the content data is defined as an external class, these properties become accessible.
|
|
988
|
+
*/
|
|
989
|
+
type ModalContentProps = {
|
|
990
|
+
/**
|
|
991
|
+
* Allows another modal to be opened from within the modal content.
|
|
992
|
+
* @param data Values for the new modal to be opened.
|
|
993
|
+
* @returns
|
|
994
|
+
*/
|
|
995
|
+
showAnotherModal?: (data?: ModalProps) => void;
|
|
996
|
+
/**
|
|
997
|
+
* Closes itself from within the modal content.
|
|
998
|
+
* @returns
|
|
999
|
+
*/
|
|
1000
|
+
hideCurrentModal?: () => void;
|
|
1001
|
+
/**
|
|
1002
|
+
* Changes the buttons disabling state.
|
|
1003
|
+
* @param value `true` for regular, `false` for disabled.
|
|
1004
|
+
* @returns
|
|
1005
|
+
*/
|
|
1006
|
+
changeButtonsState?: (value: boolean) => void;
|
|
1007
|
+
/**
|
|
1008
|
+
* Changes the loading screen state that covers the entire modal.
|
|
1009
|
+
* @param value `true` indicates loading, `false` indicates stable state.
|
|
1010
|
+
* @returns
|
|
1011
|
+
*/
|
|
1012
|
+
changeLoadingState?: (value: boolean) => void;
|
|
1013
|
+
/**
|
|
1014
|
+
* Changes the state that shows only the modal content is loading.
|
|
1015
|
+
* @param value `true` indicates loading, `false` indicates stable state.
|
|
1016
|
+
* @returns
|
|
1017
|
+
*/
|
|
1018
|
+
changeInnerLoadingState?: (value: boolean) => void;
|
|
1019
|
+
/**
|
|
1020
|
+
* Extra parameters passed when the modal is opened.
|
|
1021
|
+
*/
|
|
1022
|
+
modalProps?: any;
|
|
1023
|
+
/**
|
|
1024
|
+
* Context data to be used for access within the modal, functioning like `modalProps`.
|
|
1025
|
+
*/
|
|
1026
|
+
context?: any;
|
|
1027
|
+
};
|
|
1028
|
+
/**
|
|
1029
|
+
* #### Modal Ref Props
|
|
1030
|
+
*
|
|
1031
|
+
* It can only be used within the modal content data that utilizes `forwardRef`
|
|
1032
|
+
* along with `useImperativeHandle`.
|
|
1033
|
+
*/
|
|
1034
|
+
type ModalRefProps = {
|
|
1035
|
+
/**
|
|
1036
|
+
* If defined, it is triggered when the **OK** button inside the modal is clicked.
|
|
1037
|
+
* If you return `false`, it prevents the modal from closing. If you return `true`,
|
|
1038
|
+
* the process continues and the modal closes.
|
|
1039
|
+
* @returns
|
|
1040
|
+
*/
|
|
1041
|
+
onClickOK?: () => void;
|
|
1042
|
+
/**
|
|
1043
|
+
* If defined, it is triggered when the **Cancel** button inside the modal is clicked.
|
|
1044
|
+
* If you return `false`, it prevents the modal from closing. If you return `true`,
|
|
1045
|
+
* the process continues and the modal closes.
|
|
1046
|
+
* @returns
|
|
1047
|
+
*/
|
|
1048
|
+
onClickCancel?: () => void;
|
|
1049
|
+
};
|
|
1050
|
+
|
|
1051
|
+
type UploadProps = {
|
|
1052
|
+
action?: string;
|
|
1053
|
+
filePath?: string | null;
|
|
1054
|
+
removeAction?: string;
|
|
1055
|
+
removeExtraFormData?: {};
|
|
1056
|
+
removeExtraQueryString?: {};
|
|
1057
|
+
removeExtraHeader?: {};
|
|
1058
|
+
binaryName?: string;
|
|
1059
|
+
resultFileName?: string | null;
|
|
1060
|
+
showDeleteIcon?: boolean;
|
|
1061
|
+
showPreviewIcon?: boolean;
|
|
1062
|
+
fileHeight?: number | string;
|
|
1063
|
+
padding?: number;
|
|
1064
|
+
previewFileWidth?: number | string;
|
|
1065
|
+
previewFileHeight?: number | string;
|
|
1066
|
+
previewFilePadding?: number | string;
|
|
1067
|
+
fileTypes?: FileTypes[];
|
|
1068
|
+
maxFileSize?: number;
|
|
1069
|
+
requestMethod?: "put" | "post";
|
|
1070
|
+
extraFormData?: {};
|
|
1071
|
+
extraQueryString?: {};
|
|
1072
|
+
extraHeader?: {};
|
|
1073
|
+
disabled?: boolean;
|
|
1074
|
+
onChange?: ((value: any) => void) | null;
|
|
1075
|
+
onUpdate?: ((value: any, update: any, validation: boolean) => void) | null;
|
|
1076
|
+
onUploadSuccess?: (path: string) => void;
|
|
1077
|
+
onUploadFailed?: (message: string, code: number) => void;
|
|
1078
|
+
onRemoveFileSuccess?: (data?: any) => void;
|
|
1079
|
+
onRemoveFileFailed?: () => void;
|
|
1080
|
+
};
|
|
1081
|
+
type UploadProgressProps = {
|
|
1082
|
+
estimated: string;
|
|
1083
|
+
progress: number;
|
|
1084
|
+
bytes: string;
|
|
1085
|
+
total: string;
|
|
1086
|
+
};
|
|
1087
|
+
type UploadResultMessageProps = {
|
|
1088
|
+
message: string;
|
|
1089
|
+
status: "success" | "error" | "";
|
|
1090
|
+
};
|
|
1091
|
+
|
|
1092
|
+
declare enum ModalState {
|
|
1093
|
+
NOT_SHOW = "modal-not-show",
|
|
1094
|
+
ENTERED = "modal-entered",
|
|
1095
|
+
EXITED = "modal-exited",
|
|
1096
|
+
OK_CLICK = "modal-ok-button-click",
|
|
1097
|
+
CANCEL_CLICK = "modal-cancel-button-click",
|
|
1098
|
+
CLOSE_CLICK = "modal-close-button-click",
|
|
1099
|
+
OUTSIDE_CLICK = "modal-outside-click",
|
|
1100
|
+
ESC_CLICK = "modal-esc-click",
|
|
1101
|
+
ALL_REMOVED = "modal-all-removed"
|
|
1102
|
+
}
|
|
1103
|
+
declare enum FileTypes {
|
|
1104
|
+
SVG = "image/svg+xml",
|
|
1105
|
+
PNG = "image/png",
|
|
1106
|
+
JPG = "image/jpeg",
|
|
1107
|
+
GIF = "image/gif",
|
|
1108
|
+
PDF = "application/pdf",
|
|
1109
|
+
OTF = "font/otf"
|
|
1110
|
+
}
|
|
1111
|
+
declare enum FileExtensions {
|
|
1112
|
+
SVG = ".svg",
|
|
1113
|
+
PNG = ".png",
|
|
1114
|
+
JPG = ".jpeg",
|
|
1115
|
+
GIF = ".gif",
|
|
1116
|
+
PDF = ".pdf",
|
|
1117
|
+
OTF = ".otf"
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
export { ALink, Accordion, type AccordionItemProps, type AccordionProps, type AccordionSubMenuProps, AddDefaultThemeStyle, AddZero, Alert, type AlertProps, type AlertSize, type AlertType, Arrow as ArrowIcon, BackToTop, BackTop, Button, type ButtonContentPosition, type ButtonProps, type ButtonSize, type ButtonState, type ButtonType, type ButtonVariant, Calendar, CheckFileURL, Checkbox, type CheckboxEvent, type CheckboxGroupProps, type CheckboxProps, Checkmark, ChunkArray, Collapse, ConsoleLog, ConvertCurrency, DatePicker, DetermineNewHeight, DetermineNewWidth, type FieldUpdateProps, FileChecker, FileExtensions, FileTypes, FindSelector, Form, type FormContextType, type FormItemProps, type FormProps, type FormRuleProps, type FormSubComponentProps, type FormValueProps, FormatBytes, GetByCurrency, GetCountryCodeByCurrencyCode, GetCountryCodeByLanguage, GetCurrencyFormat, GetCurrencySymbol, GetDecimalByCurrency, GetTypeByFileType, type GroupCheckboxOptionType, ITDContext, type ITDContextType, type ITDImperativeFuncProps, ITDProvider, type ITDProviderProps, _default as Image, InlineSelect, InlineSelectArrow, Input, type InputProps, IsValidJSON, Lock as LockIcon, type ModalContentProps, ModalManager, type ModalProps, type ModalRefProps, ModalState, Notification, type NotificationContextType, type NotificationsProps, Picture, Radio, RemoveUnits, Result, Select, type SelectOptionProps, type SelectProps, type SingleQueryProps, Spin, Status, Switch, type SwitchProps, TinyScrollbar, Tooltip, Trash, UniUpperCase, UpdateThemeStyle, Upload, Upload$1 as UploadIcon, type UploadProgressProps, type UploadProps, type UploadResultMessageProps, Wait, ZoomIn, ZoomOut, useAddExternalCSS, useComponentSize, useConnectionStatus, useConstructor, useCoreFetch, useCreateDynamicStyle, useCreateStyledStyle, useMultiQuery, useOnClickOutside, useOnESCKeyDown, useOnResize, useReCaptcha, useSingleQuery };
|