test-stpr-ui-kit 0.2.0 → 0.2.2
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 +127 -14
- package/dist/test-stpr-ui-kit.es.js +6375 -3950
- 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,18 @@ 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;
|
|
158
|
+
classNameBaseTooltipContentRoot?: string;
|
|
116
159
|
}
|
|
117
160
|
|
|
118
161
|
export declare enum ETooltipPosition {
|
|
@@ -144,6 +187,8 @@ export declare interface FormProps extends default_2.PropsWithChildren {
|
|
|
144
187
|
autoComplete?: default_2.AutoFillBase;
|
|
145
188
|
}
|
|
146
189
|
|
|
190
|
+
export { HistoryClockIcon }
|
|
191
|
+
|
|
147
192
|
export declare const Icon: default_2.FC<IconProps>;
|
|
148
193
|
|
|
149
194
|
export declare interface IconProps extends default_2.SVGProps<SVGSVGElement> {
|
|
@@ -163,7 +208,17 @@ export { InfoIcon }
|
|
|
163
208
|
|
|
164
209
|
export declare const InfoTooltip: default_2.FC<TooltipProps>;
|
|
165
210
|
|
|
166
|
-
export declare const Input: default_2.ForwardRefExoticComponent<InputProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
211
|
+
export declare const Input: default_2.ForwardRefExoticComponent<Omit<InputProps, "ref"> & default_2.RefAttributes<HTMLInputElement>>;
|
|
212
|
+
|
|
213
|
+
export declare const InputFiles: default_2.FC<InputFilesProps>;
|
|
214
|
+
|
|
215
|
+
export declare interface InputFilesProps extends Omit<DefaultDropzoneProps, "children"> {
|
|
216
|
+
classNameRoot?: string;
|
|
217
|
+
tooltipPosition?: ETooltipPosition;
|
|
218
|
+
infoTooltipText?: string;
|
|
219
|
+
error?: string;
|
|
220
|
+
placeholder?: string;
|
|
221
|
+
}
|
|
167
222
|
|
|
168
223
|
export declare interface InputProps {
|
|
169
224
|
name: string;
|
|
@@ -187,6 +242,7 @@ export declare interface InputProps {
|
|
|
187
242
|
classNameError?: string;
|
|
188
243
|
classNameLabel?: string;
|
|
189
244
|
classNameRoot?: string;
|
|
245
|
+
ref?: ForwardedRef<HTMLInputElement>;
|
|
190
246
|
}
|
|
191
247
|
|
|
192
248
|
export declare const Label: default_2.FC<LabelProps>;
|
|
@@ -199,7 +255,16 @@ export declare interface LabelProps {
|
|
|
199
255
|
classNameRoot?: string;
|
|
200
256
|
}
|
|
201
257
|
|
|
202
|
-
export declare const
|
|
258
|
+
export declare const Layer: default_2.FC<LayerProps>;
|
|
259
|
+
|
|
260
|
+
export declare interface LayerProps {
|
|
261
|
+
children: default_2.ReactNode;
|
|
262
|
+
zIndex: number;
|
|
263
|
+
isHiddenModal?: boolean;
|
|
264
|
+
classNameRoot?: string;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export declare const MediaContext: default_2.Context<IMediaContext>;
|
|
203
268
|
|
|
204
269
|
export declare const MediaContextProvider: default_2.FC<MediaContextProviderProps>;
|
|
205
270
|
|
|
@@ -207,26 +272,43 @@ export declare interface MediaContextProviderProps extends default_2.PropsWithCh
|
|
|
207
272
|
breakpoints: TBreakpoints;
|
|
208
273
|
}
|
|
209
274
|
|
|
275
|
+
export { MinusIcon }
|
|
276
|
+
|
|
277
|
+
export declare const Modal: default_2.FC<ModalProps>;
|
|
278
|
+
|
|
279
|
+
export declare interface ModalProps extends default_2.PropsWithChildren {
|
|
280
|
+
zIndex: number;
|
|
281
|
+
isHiddenModal?: boolean;
|
|
282
|
+
isVisibleCloseButton?: boolean;
|
|
283
|
+
classNameRoot?: string;
|
|
284
|
+
classNameLayerRoot?: string;
|
|
285
|
+
modalName: string;
|
|
286
|
+
style?: CSSProperties;
|
|
287
|
+
subHeader?: ReactNode;
|
|
288
|
+
align?: "center" | "top";
|
|
289
|
+
onClose: (event: default_2.MouseEvent<HTMLButtonElement>) => void;
|
|
290
|
+
}
|
|
291
|
+
|
|
210
292
|
export { PlusIcon }
|
|
211
293
|
|
|
212
294
|
export { PlusSquareIcon }
|
|
213
295
|
|
|
296
|
+
export declare const Portal: default_2.FC<PortalProps>;
|
|
297
|
+
|
|
298
|
+
export declare interface PortalProps extends default_2.PropsWithChildren {
|
|
299
|
+
node: Element | DocumentFragment;
|
|
300
|
+
}
|
|
301
|
+
|
|
214
302
|
export declare const Select: default_2.FC<SelectProps>;
|
|
215
303
|
|
|
216
304
|
export { SelectChevronDownIcon }
|
|
217
305
|
|
|
218
|
-
export declare type SelectOption = {
|
|
219
|
-
value: string | null;
|
|
220
|
-
label: string;
|
|
221
|
-
key?: string;
|
|
222
|
-
};
|
|
223
|
-
|
|
224
306
|
export declare interface SelectProps {
|
|
225
|
-
options:
|
|
307
|
+
options: TSelectOption[];
|
|
226
308
|
placeholder?: string;
|
|
227
309
|
value?: string;
|
|
228
310
|
name: string;
|
|
229
|
-
onChange: (event: default_2.
|
|
311
|
+
onChange: (event: default_2.MouseEvent<HTMLDivElement, MouseEvent>, data: {
|
|
230
312
|
value: string | null;
|
|
231
313
|
name: string;
|
|
232
314
|
}) => void;
|
|
@@ -283,6 +365,13 @@ export declare type TButtonType = "submit" | "reset" | "button";
|
|
|
283
365
|
|
|
284
366
|
export declare type TButtonVariant = "primary" | "secondary" | "link";
|
|
285
367
|
|
|
368
|
+
export declare type TContextMenuItem = {
|
|
369
|
+
key?: string;
|
|
370
|
+
label?: string;
|
|
371
|
+
iconName?: EIconName;
|
|
372
|
+
onClick?: (id?: string) => void;
|
|
373
|
+
};
|
|
374
|
+
|
|
286
375
|
export declare type TDropdownListItem = {
|
|
287
376
|
name: string;
|
|
288
377
|
onClick?: () => void;
|
|
@@ -290,7 +379,7 @@ export declare type TDropdownListItem = {
|
|
|
290
379
|
textCenter?: boolean;
|
|
291
380
|
};
|
|
292
381
|
|
|
293
|
-
declare const Text_2: default_2.
|
|
382
|
+
declare const Text_2: default_2.ForwardRefExoticComponent<Omit<TextProps, "ref"> & default_2.RefAttributes<HTMLDivElement>>;
|
|
294
383
|
export { Text_2 as Text }
|
|
295
384
|
|
|
296
385
|
export declare interface TextProps {
|
|
@@ -304,6 +393,7 @@ export declare interface TextProps {
|
|
|
304
393
|
isCursorPointer?: boolean;
|
|
305
394
|
isCursorPointerByOnClick?: boolean;
|
|
306
395
|
type?: "h1" | "h3" | "p1" | "p2" | "description" | "link";
|
|
396
|
+
ref?: ForwardedRef<HTMLDivElement>;
|
|
307
397
|
}
|
|
308
398
|
|
|
309
399
|
export declare const TextWithLabel: default_2.FC<TextWithLabelProps>;
|
|
@@ -314,7 +404,7 @@ export declare interface TextWithLabelProps extends TextProps {
|
|
|
314
404
|
|
|
315
405
|
export declare const Tooltip: default_2.FC<TooltipProps>;
|
|
316
406
|
|
|
317
|
-
export declare interface TooltipProps extends BaseTooltipProps {
|
|
407
|
+
export declare interface TooltipProps extends Omit<BaseTooltipProps, "classNameRoot" | "classNameContentRoot"> {
|
|
318
408
|
hover?: boolean;
|
|
319
409
|
isToggleClick?: boolean;
|
|
320
410
|
isVisibleTooltip?: boolean;
|
|
@@ -323,6 +413,8 @@ export declare interface TooltipProps extends BaseTooltipProps {
|
|
|
323
413
|
actionOnClose?: () => void;
|
|
324
414
|
classNameTooltip?: string;
|
|
325
415
|
classNameTriggerTooltip?: string;
|
|
416
|
+
classNameBaseTooltipRoot?: string;
|
|
417
|
+
classNameBaseTooltipContentRoot?: string;
|
|
326
418
|
}
|
|
327
419
|
|
|
328
420
|
export declare type TPaneItem = {
|
|
@@ -335,6 +427,12 @@ export declare type TPaneItem = {
|
|
|
335
427
|
|
|
336
428
|
export { TrashIcon }
|
|
337
429
|
|
|
430
|
+
export declare type TSelectOption = {
|
|
431
|
+
value: string | null;
|
|
432
|
+
label: string;
|
|
433
|
+
key?: string;
|
|
434
|
+
};
|
|
435
|
+
|
|
338
436
|
export declare type TTableColumnsData = TTableColumnsDataItem[];
|
|
339
437
|
|
|
340
438
|
export declare type TTableColumnsDataItem = {
|
|
@@ -367,6 +465,21 @@ export declare const useMediaContext: (breakpoints: TBreakpoints) => {
|
|
|
367
465
|
};
|
|
368
466
|
};
|
|
369
467
|
|
|
468
|
+
export declare const useModal: (params?: UseModalParams) => {
|
|
469
|
+
isOpen: boolean;
|
|
470
|
+
modalData: {
|
|
471
|
+
[name: string]: any;
|
|
472
|
+
} | null;
|
|
473
|
+
onOpenModal: (modalData: {
|
|
474
|
+
[name: string]: boolean | Object;
|
|
475
|
+
}) => void;
|
|
476
|
+
onCloseModal: () => void;
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
declare interface UseModalParams {
|
|
480
|
+
initialValue?: never;
|
|
481
|
+
}
|
|
482
|
+
|
|
370
483
|
export { WarningColorIcon }
|
|
371
484
|
|
|
372
485
|
export { }
|