test-stpr-ui-kit 0.2.1 → 0.3.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/dist/style.css +1 -1
- package/dist/test-stpr-ui-kit.es.d.ts +60 -16
- package/dist/test-stpr-ui-kit.es.js +4357 -4176
- package/dist/test-stpr-ui-kit.umd.js +22 -22
- package/package.json +1 -1
|
@@ -13,7 +13,6 @@ import { default as HistoryClockIcon } from '../../images/history-clock.svg?reac
|
|
|
13
13
|
import { default as InfoIcon } from '../../images/info.svg?react';
|
|
14
14
|
import { default as MinusIcon } from '../../images/minus.svg?react';
|
|
15
15
|
import { MouseEventHandler } from 'react';
|
|
16
|
-
import { MutableRefObject } from 'react';
|
|
17
16
|
import { default as PlusIcon } from '../../images/plus.svg?react';
|
|
18
17
|
import { default as PlusSquareIcon } from '../../images/plus-square.svg?react';
|
|
19
18
|
import { ReactNode } from 'react';
|
|
@@ -38,14 +37,29 @@ export declare interface AccordionProps extends default_2.PropsWithChildren {
|
|
|
38
37
|
classNameChildrenWrapper?: string;
|
|
39
38
|
}
|
|
40
39
|
|
|
40
|
+
export declare const ApplyButtons: default_2.FC<ApplyButtonsProps>;
|
|
41
|
+
|
|
42
|
+
export declare interface ApplyButtonsProps {
|
|
43
|
+
mobile?: TApplyButtonsMobile;
|
|
44
|
+
align?: TApplyButtonsAlign;
|
|
45
|
+
cancelBtnContent?: string;
|
|
46
|
+
cancelBtnIconName?: EIconName;
|
|
47
|
+
submitBtnContent?: string;
|
|
48
|
+
cancelBtnDisabled?: boolean;
|
|
49
|
+
formId?: string;
|
|
50
|
+
disabled?: boolean;
|
|
51
|
+
onClose: (event: default_2.MouseEvent<HTMLButtonElement>) => void;
|
|
52
|
+
submit?: (event: default_2.MouseEvent<HTMLButtonElement>) => void;
|
|
53
|
+
}
|
|
54
|
+
|
|
41
55
|
export declare const BaseTooltip: default_2.ForwardRefExoticComponent<BaseTooltipProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
42
56
|
|
|
43
57
|
export declare interface BaseTooltipProps {
|
|
44
|
-
position?: ETooltipPosition;
|
|
45
58
|
text?: string | ReactNode;
|
|
46
59
|
noPadding?: boolean;
|
|
47
60
|
classNameRoot?: string;
|
|
48
61
|
classNameContentRoot?: string;
|
|
62
|
+
style?: default_2.CSSProperties;
|
|
49
63
|
}
|
|
50
64
|
|
|
51
65
|
export declare const Button: default_2.FC<ButtonProps>;
|
|
@@ -61,6 +75,7 @@ export declare interface ButtonProps extends default_2.PropsWithChildren {
|
|
|
61
75
|
isFullWidth?: boolean;
|
|
62
76
|
noPadding?: boolean;
|
|
63
77
|
isOnlyIcon?: boolean;
|
|
78
|
+
loading?: boolean;
|
|
64
79
|
iconName?: EIconName;
|
|
65
80
|
classNameRoot?: string;
|
|
66
81
|
classNameIconContainerRoot?: string;
|
|
@@ -70,6 +85,7 @@ export declare interface ButtonProps extends default_2.PropsWithChildren {
|
|
|
70
85
|
export declare const Checkbox: default_2.FC<CheckboxProps>;
|
|
71
86
|
|
|
72
87
|
export declare interface CheckboxProps {
|
|
88
|
+
size?: "md" | "lg";
|
|
73
89
|
checked?: boolean;
|
|
74
90
|
disabled?: boolean;
|
|
75
91
|
onChange: (event: default_2.ChangeEvent<HTMLInputElement>, data: {
|
|
@@ -95,12 +111,21 @@ export { ChevronDownIcon }
|
|
|
95
111
|
|
|
96
112
|
export { CloseIcon }
|
|
97
113
|
|
|
114
|
+
export declare const Confirm: default_2.FC<ConfirmProps>;
|
|
115
|
+
|
|
116
|
+
export declare interface ConfirmProps extends ApplyButtonsProps {
|
|
117
|
+
zIndex: number;
|
|
118
|
+
title?: string | default_2.ReactNode;
|
|
119
|
+
subtitle?: string | default_2.ReactNode;
|
|
120
|
+
modalAlign?: TModalAlign;
|
|
121
|
+
}
|
|
122
|
+
|
|
98
123
|
export declare const ContextMenu: default_2.FC<ContextMenuProps>;
|
|
99
124
|
|
|
100
125
|
export declare interface ContextMenuProps {
|
|
101
|
-
list: TContextMenuItem[];
|
|
102
126
|
classNameRoot?: string;
|
|
103
|
-
|
|
127
|
+
options: Array<TContextMenuOption> | [];
|
|
128
|
+
onClickItem?: (option: TContextMenuOption) => void;
|
|
104
129
|
}
|
|
105
130
|
|
|
106
131
|
export { CopyIcon }
|
|
@@ -155,6 +180,8 @@ export declare interface EllipsisTextWithTooltipProps extends Omit<TextProps, "c
|
|
|
155
180
|
classNameRoot?: string;
|
|
156
181
|
classNameTooltipRoot?: string;
|
|
157
182
|
defaultTooltipPosition?: ETooltipPosition;
|
|
183
|
+
classNameBaseTooltipContentRoot?: string;
|
|
184
|
+
classNameBaseTooltipRoot?: string;
|
|
158
185
|
}
|
|
159
186
|
|
|
160
187
|
export declare enum ETooltipPosition {
|
|
@@ -175,6 +202,7 @@ export declare enum ETooltipPosition {
|
|
|
175
202
|
export declare const Form: default_2.FC<FormProps>;
|
|
176
203
|
|
|
177
204
|
export declare interface FormProps extends default_2.PropsWithChildren {
|
|
205
|
+
size?: "md" | "lg";
|
|
178
206
|
withSeparator?: boolean;
|
|
179
207
|
classNameRoot?: string;
|
|
180
208
|
addMargin?: boolean;
|
|
@@ -277,14 +305,15 @@ export declare const Modal: default_2.FC<ModalProps>;
|
|
|
277
305
|
|
|
278
306
|
export declare interface ModalProps extends default_2.PropsWithChildren {
|
|
279
307
|
zIndex: number;
|
|
308
|
+
align?: TModalAlign;
|
|
280
309
|
isHiddenModal?: boolean;
|
|
281
310
|
isVisibleCloseButton?: boolean;
|
|
282
311
|
classNameRoot?: string;
|
|
283
312
|
classNameLayerRoot?: string;
|
|
284
|
-
|
|
313
|
+
header: string | ReactNode;
|
|
314
|
+
footer?: ReactNode;
|
|
285
315
|
style?: CSSProperties;
|
|
286
316
|
subHeader?: ReactNode;
|
|
287
|
-
align?: "center" | "top";
|
|
288
317
|
onClose: (event: default_2.MouseEvent<HTMLButtonElement>) => void;
|
|
289
318
|
}
|
|
290
319
|
|
|
@@ -295,7 +324,8 @@ export { PlusSquareIcon }
|
|
|
295
324
|
export declare const Portal: default_2.FC<PortalProps>;
|
|
296
325
|
|
|
297
326
|
export declare interface PortalProps extends default_2.PropsWithChildren {
|
|
298
|
-
node
|
|
327
|
+
node?: Element | DocumentFragment | null;
|
|
328
|
+
classNameRoot?: string;
|
|
299
329
|
}
|
|
300
330
|
|
|
301
331
|
export declare const Select: default_2.FC<SelectProps>;
|
|
@@ -326,6 +356,16 @@ export declare interface SelectProps {
|
|
|
326
356
|
classNameLabel?: string;
|
|
327
357
|
}
|
|
328
358
|
|
|
359
|
+
export declare const Spinner: default_2.FC<SpinnerProps>;
|
|
360
|
+
|
|
361
|
+
export declare interface SpinnerProps {
|
|
362
|
+
size?: SpinnerSize;
|
|
363
|
+
color?: string;
|
|
364
|
+
classNameRoot?: string;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
export declare type SpinnerSize = "sm" | "md" | "lg" | "xl";
|
|
368
|
+
|
|
329
369
|
export declare type SVGComponent = default_2.FC<default_2.SVGProps<SVGSVGElement>>;
|
|
330
370
|
|
|
331
371
|
export declare const Table: default_2.FC<TableProps>;
|
|
@@ -345,6 +385,10 @@ export declare interface TabsProps {
|
|
|
345
385
|
classNameRoot?: string;
|
|
346
386
|
}
|
|
347
387
|
|
|
388
|
+
declare type TApplyButtonsAlign = "left" | "center" | "right";
|
|
389
|
+
|
|
390
|
+
declare type TApplyButtonsMobile = "row" | "column";
|
|
391
|
+
|
|
348
392
|
export declare type TBreakpoints = {
|
|
349
393
|
desktop: {
|
|
350
394
|
minWidth: number;
|
|
@@ -364,11 +408,11 @@ export declare type TButtonType = "submit" | "reset" | "button";
|
|
|
364
408
|
|
|
365
409
|
export declare type TButtonVariant = "primary" | "secondary" | "link";
|
|
366
410
|
|
|
367
|
-
export declare type
|
|
411
|
+
export declare type TContextMenuOption = {
|
|
368
412
|
key?: string;
|
|
413
|
+
value?: string;
|
|
369
414
|
label?: string;
|
|
370
415
|
iconName?: EIconName;
|
|
371
|
-
onClick?: (id?: string) => void;
|
|
372
416
|
};
|
|
373
417
|
|
|
374
418
|
export declare type TDropdownListItem = {
|
|
@@ -401,17 +445,22 @@ export declare interface TextWithLabelProps extends TextProps {
|
|
|
401
445
|
label: string;
|
|
402
446
|
}
|
|
403
447
|
|
|
448
|
+
declare type TModalAlign = "center" | "top";
|
|
449
|
+
|
|
404
450
|
export declare const Tooltip: default_2.FC<TooltipProps>;
|
|
405
451
|
|
|
406
|
-
export declare interface TooltipProps extends BaseTooltipProps {
|
|
452
|
+
export declare interface TooltipProps extends Omit<BaseTooltipProps, "classNameRoot" | "classNameContentRoot"> {
|
|
407
453
|
hover?: boolean;
|
|
408
454
|
isToggleClick?: boolean;
|
|
409
455
|
isVisibleTooltip?: boolean;
|
|
456
|
+
position?: ETooltipPosition;
|
|
410
457
|
trigger?: default_2.ReactNode;
|
|
411
458
|
triggerAction?: () => void;
|
|
412
459
|
actionOnClose?: () => void;
|
|
413
460
|
classNameTooltip?: string;
|
|
414
461
|
classNameTriggerTooltip?: string;
|
|
462
|
+
classNameBaseTooltipRoot?: string;
|
|
463
|
+
classNameBaseTooltipContentRoot?: string;
|
|
415
464
|
}
|
|
416
465
|
|
|
417
466
|
export declare type TPaneItem = {
|
|
@@ -449,11 +498,6 @@ export declare type TTableRowsDataItem = {
|
|
|
449
498
|
|
|
450
499
|
export { UploadIcon }
|
|
451
500
|
|
|
452
|
-
export declare const useContentHeight: (open: boolean) => {
|
|
453
|
-
contentRef: MutableRefObject<HTMLDivElement | null>;
|
|
454
|
-
height: string;
|
|
455
|
-
};
|
|
456
|
-
|
|
457
501
|
export declare const useMediaContext: (breakpoints: TBreakpoints) => {
|
|
458
502
|
device: {
|
|
459
503
|
isDesktop: boolean;
|
|
@@ -468,7 +512,7 @@ export declare const useModal: (params?: UseModalParams) => {
|
|
|
468
512
|
[name: string]: any;
|
|
469
513
|
} | null;
|
|
470
514
|
onOpenModal: (modalData: {
|
|
471
|
-
[name: string]: boolean |
|
|
515
|
+
[name: string]: boolean | NonNullable<unknown>;
|
|
472
516
|
}) => void;
|
|
473
517
|
onCloseModal: () => void;
|
|
474
518
|
};
|