test-stpr-ui-kit 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +1 -1
- package/dist/test-stpr-ui-kit.es.d.ts +123 -13
- package/dist/test-stpr-ui-kit.es.js +6370 -3947
- package/dist/test-stpr-ui-kit.umd.js +26 -22
- package/package.json +2 -1
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
import { Accept } from 'react-dropzone';
|
|
1
2
|
import { default as CheckIcon } from '../../images/check.svg?react';
|
|
2
3
|
import { default as ChevronDownIcon } from '../../images/chevron-down.svg?react';
|
|
3
4
|
import { default as CloseIcon } from '../../images/close.svg?react';
|
|
4
|
-
import { Context } from 'react';
|
|
5
5
|
import { default as CopyIcon } from '../../images/copy.svg?react';
|
|
6
6
|
import { CSSProperties } from 'react';
|
|
7
7
|
import { default as default_2 } from 'react';
|
|
8
|
+
import { default as DotsIcon } from '../../images/dots.svg?react';
|
|
9
|
+
import { DropEvent } from 'react-dropzone';
|
|
10
|
+
import { FileRejection } from 'react-dropzone';
|
|
11
|
+
import { ForwardedRef } from 'react';
|
|
12
|
+
import { default as HistoryClockIcon } from '../../images/history-clock.svg?react';
|
|
8
13
|
import { default as InfoIcon } from '../../images/info.svg?react';
|
|
14
|
+
import { default as MinusIcon } from '../../images/minus.svg?react';
|
|
9
15
|
import { MouseEventHandler } from 'react';
|
|
10
16
|
import { MutableRefObject } from 'react';
|
|
11
17
|
import { default as PlusIcon } from '../../images/plus.svg?react';
|
|
@@ -53,10 +59,12 @@ export declare interface ButtonProps extends default_2.PropsWithChildren {
|
|
|
53
59
|
type?: TButtonType;
|
|
54
60
|
form?: string;
|
|
55
61
|
isFullWidth?: boolean;
|
|
62
|
+
noPadding?: boolean;
|
|
56
63
|
isOnlyIcon?: boolean;
|
|
57
64
|
iconName?: EIconName;
|
|
58
65
|
classNameRoot?: string;
|
|
59
66
|
classNameIconContainerRoot?: string;
|
|
67
|
+
iconRotate?: number;
|
|
60
68
|
}
|
|
61
69
|
|
|
62
70
|
export declare const Checkbox: default_2.FC<CheckboxProps>;
|
|
@@ -87,8 +95,32 @@ export { ChevronDownIcon }
|
|
|
87
95
|
|
|
88
96
|
export { CloseIcon }
|
|
89
97
|
|
|
98
|
+
export declare const ContextMenu: default_2.FC<ContextMenuProps>;
|
|
99
|
+
|
|
100
|
+
export declare interface ContextMenuProps {
|
|
101
|
+
list: TContextMenuItem[];
|
|
102
|
+
classNameRoot?: string;
|
|
103
|
+
parentId?: string;
|
|
104
|
+
}
|
|
105
|
+
|
|
90
106
|
export { CopyIcon }
|
|
91
107
|
|
|
108
|
+
export declare const DefaultDropzone: default_2.FC<DefaultDropzoneProps>;
|
|
109
|
+
|
|
110
|
+
export declare interface DefaultDropzoneProps {
|
|
111
|
+
onDropFiles: <T extends File>(acceptedFiles: T[], name: string, fileRejections?: FileRejection[], event?: DropEvent) => void;
|
|
112
|
+
maxSize?: number;
|
|
113
|
+
accept?: Accept;
|
|
114
|
+
disabled?: boolean;
|
|
115
|
+
multiple?: boolean;
|
|
116
|
+
maxFiles?: number;
|
|
117
|
+
files?: File[];
|
|
118
|
+
children?: default_2.ReactNode;
|
|
119
|
+
name: string;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export { DotsIcon }
|
|
123
|
+
|
|
92
124
|
export declare const Dropdown: default_2.FC<DropdownProps>;
|
|
93
125
|
|
|
94
126
|
export declare interface DropdownProps {
|
|
@@ -112,7 +144,17 @@ export declare enum EIconName {
|
|
|
112
144
|
PlusSquare = "plusSquare",
|
|
113
145
|
WarningColor = "warningColor",
|
|
114
146
|
Dots = "dots",
|
|
115
|
-
HistoryClock = "historyClock"
|
|
147
|
+
HistoryClock = "historyClock",
|
|
148
|
+
Minus = "minus"
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export declare const EllipsisTextWithTooltip: default_2.FC<EllipsisTextWithTooltipProps>;
|
|
152
|
+
|
|
153
|
+
export declare interface EllipsisTextWithTooltipProps extends Omit<TextProps, "children" | "isEllipsis" | "ref"> {
|
|
154
|
+
text: string;
|
|
155
|
+
classNameRoot?: string;
|
|
156
|
+
classNameTooltipRoot?: string;
|
|
157
|
+
defaultTooltipPosition?: ETooltipPosition;
|
|
116
158
|
}
|
|
117
159
|
|
|
118
160
|
export declare enum ETooltipPosition {
|
|
@@ -144,6 +186,8 @@ export declare interface FormProps extends default_2.PropsWithChildren {
|
|
|
144
186
|
autoComplete?: default_2.AutoFillBase;
|
|
145
187
|
}
|
|
146
188
|
|
|
189
|
+
export { HistoryClockIcon }
|
|
190
|
+
|
|
147
191
|
export declare const Icon: default_2.FC<IconProps>;
|
|
148
192
|
|
|
149
193
|
export declare interface IconProps extends default_2.SVGProps<SVGSVGElement> {
|
|
@@ -163,7 +207,17 @@ export { InfoIcon }
|
|
|
163
207
|
|
|
164
208
|
export declare const InfoTooltip: default_2.FC<TooltipProps>;
|
|
165
209
|
|
|
166
|
-
export declare const Input: default_2.ForwardRefExoticComponent<InputProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
210
|
+
export declare const Input: default_2.ForwardRefExoticComponent<Omit<InputProps, "ref"> & default_2.RefAttributes<HTMLInputElement>>;
|
|
211
|
+
|
|
212
|
+
export declare const InputFiles: default_2.FC<InputFilesProps>;
|
|
213
|
+
|
|
214
|
+
export declare interface InputFilesProps extends Omit<DefaultDropzoneProps, "children"> {
|
|
215
|
+
classNameRoot?: string;
|
|
216
|
+
tooltipPosition?: ETooltipPosition;
|
|
217
|
+
infoTooltipText?: string;
|
|
218
|
+
error?: string;
|
|
219
|
+
placeholder?: string;
|
|
220
|
+
}
|
|
167
221
|
|
|
168
222
|
export declare interface InputProps {
|
|
169
223
|
name: string;
|
|
@@ -187,6 +241,7 @@ export declare interface InputProps {
|
|
|
187
241
|
classNameError?: string;
|
|
188
242
|
classNameLabel?: string;
|
|
189
243
|
classNameRoot?: string;
|
|
244
|
+
ref?: ForwardedRef<HTMLInputElement>;
|
|
190
245
|
}
|
|
191
246
|
|
|
192
247
|
export declare const Label: default_2.FC<LabelProps>;
|
|
@@ -199,7 +254,16 @@ export declare interface LabelProps {
|
|
|
199
254
|
classNameRoot?: string;
|
|
200
255
|
}
|
|
201
256
|
|
|
202
|
-
export declare const
|
|
257
|
+
export declare const Layer: default_2.FC<LayerProps>;
|
|
258
|
+
|
|
259
|
+
export declare interface LayerProps {
|
|
260
|
+
children: default_2.ReactNode;
|
|
261
|
+
zIndex: number;
|
|
262
|
+
isHiddenModal?: boolean;
|
|
263
|
+
classNameRoot?: string;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export declare const MediaContext: default_2.Context<IMediaContext>;
|
|
203
267
|
|
|
204
268
|
export declare const MediaContextProvider: default_2.FC<MediaContextProviderProps>;
|
|
205
269
|
|
|
@@ -207,26 +271,43 @@ export declare interface MediaContextProviderProps extends default_2.PropsWithCh
|
|
|
207
271
|
breakpoints: TBreakpoints;
|
|
208
272
|
}
|
|
209
273
|
|
|
274
|
+
export { MinusIcon }
|
|
275
|
+
|
|
276
|
+
export declare const Modal: default_2.FC<ModalProps>;
|
|
277
|
+
|
|
278
|
+
export declare interface ModalProps extends default_2.PropsWithChildren {
|
|
279
|
+
zIndex: number;
|
|
280
|
+
isHiddenModal?: boolean;
|
|
281
|
+
isVisibleCloseButton?: boolean;
|
|
282
|
+
classNameRoot?: string;
|
|
283
|
+
classNameLayerRoot?: string;
|
|
284
|
+
modalName: string;
|
|
285
|
+
style?: CSSProperties;
|
|
286
|
+
subHeader?: ReactNode;
|
|
287
|
+
align?: "center" | "top";
|
|
288
|
+
onClose: (event: default_2.MouseEvent<HTMLButtonElement>) => void;
|
|
289
|
+
}
|
|
290
|
+
|
|
210
291
|
export { PlusIcon }
|
|
211
292
|
|
|
212
293
|
export { PlusSquareIcon }
|
|
213
294
|
|
|
295
|
+
export declare const Portal: default_2.FC<PortalProps>;
|
|
296
|
+
|
|
297
|
+
export declare interface PortalProps extends default_2.PropsWithChildren {
|
|
298
|
+
node: Element | DocumentFragment;
|
|
299
|
+
}
|
|
300
|
+
|
|
214
301
|
export declare const Select: default_2.FC<SelectProps>;
|
|
215
302
|
|
|
216
303
|
export { SelectChevronDownIcon }
|
|
217
304
|
|
|
218
|
-
export declare type SelectOption = {
|
|
219
|
-
value: string | null;
|
|
220
|
-
label: string;
|
|
221
|
-
key?: string;
|
|
222
|
-
};
|
|
223
|
-
|
|
224
305
|
export declare interface SelectProps {
|
|
225
|
-
options:
|
|
306
|
+
options: TSelectOption[];
|
|
226
307
|
placeholder?: string;
|
|
227
308
|
value?: string;
|
|
228
309
|
name: string;
|
|
229
|
-
onChange: (event: default_2.
|
|
310
|
+
onChange: (event: default_2.MouseEvent<HTMLDivElement, MouseEvent>, data: {
|
|
230
311
|
value: string | null;
|
|
231
312
|
name: string;
|
|
232
313
|
}) => void;
|
|
@@ -283,6 +364,13 @@ export declare type TButtonType = "submit" | "reset" | "button";
|
|
|
283
364
|
|
|
284
365
|
export declare type TButtonVariant = "primary" | "secondary" | "link";
|
|
285
366
|
|
|
367
|
+
export declare type TContextMenuItem = {
|
|
368
|
+
key?: string;
|
|
369
|
+
label?: string;
|
|
370
|
+
iconName?: EIconName;
|
|
371
|
+
onClick?: (id?: string) => void;
|
|
372
|
+
};
|
|
373
|
+
|
|
286
374
|
export declare type TDropdownListItem = {
|
|
287
375
|
name: string;
|
|
288
376
|
onClick?: () => void;
|
|
@@ -290,7 +378,7 @@ export declare type TDropdownListItem = {
|
|
|
290
378
|
textCenter?: boolean;
|
|
291
379
|
};
|
|
292
380
|
|
|
293
|
-
declare const Text_2: default_2.
|
|
381
|
+
declare const Text_2: default_2.ForwardRefExoticComponent<Omit<TextProps, "ref"> & default_2.RefAttributes<HTMLDivElement>>;
|
|
294
382
|
export { Text_2 as Text }
|
|
295
383
|
|
|
296
384
|
export declare interface TextProps {
|
|
@@ -304,6 +392,7 @@ export declare interface TextProps {
|
|
|
304
392
|
isCursorPointer?: boolean;
|
|
305
393
|
isCursorPointerByOnClick?: boolean;
|
|
306
394
|
type?: "h1" | "h3" | "p1" | "p2" | "description" | "link";
|
|
395
|
+
ref?: ForwardedRef<HTMLDivElement>;
|
|
307
396
|
}
|
|
308
397
|
|
|
309
398
|
export declare const TextWithLabel: default_2.FC<TextWithLabelProps>;
|
|
@@ -335,6 +424,12 @@ export declare type TPaneItem = {
|
|
|
335
424
|
|
|
336
425
|
export { TrashIcon }
|
|
337
426
|
|
|
427
|
+
export declare type TSelectOption = {
|
|
428
|
+
value: string | null;
|
|
429
|
+
label: string;
|
|
430
|
+
key?: string;
|
|
431
|
+
};
|
|
432
|
+
|
|
338
433
|
export declare type TTableColumnsData = TTableColumnsDataItem[];
|
|
339
434
|
|
|
340
435
|
export declare type TTableColumnsDataItem = {
|
|
@@ -367,6 +462,21 @@ export declare const useMediaContext: (breakpoints: TBreakpoints) => {
|
|
|
367
462
|
};
|
|
368
463
|
};
|
|
369
464
|
|
|
465
|
+
export declare const useModal: (params?: UseModalParams) => {
|
|
466
|
+
isOpen: boolean;
|
|
467
|
+
modalData: {
|
|
468
|
+
[name: string]: any;
|
|
469
|
+
} | null;
|
|
470
|
+
onOpenModal: (modalData: {
|
|
471
|
+
[name: string]: boolean | Object;
|
|
472
|
+
}) => void;
|
|
473
|
+
onCloseModal: () => void;
|
|
474
|
+
};
|
|
475
|
+
|
|
476
|
+
declare interface UseModalParams {
|
|
477
|
+
initialValue?: never;
|
|
478
|
+
}
|
|
479
|
+
|
|
370
480
|
export { WarningColorIcon }
|
|
371
481
|
|
|
372
482
|
export { }
|