test-stpr-ui-kit 0.2.2 → 0.3.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.
@@ -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
- parentId?: string;
127
+ options: Array<TContextMenuOption> | [];
128
+ onClickItem?: (option: TContextMenuOption) => void;
104
129
  }
105
130
 
106
131
  export { CopyIcon }
@@ -156,6 +181,7 @@ export declare interface EllipsisTextWithTooltipProps extends Omit<TextProps, "c
156
181
  classNameTooltipRoot?: string;
157
182
  defaultTooltipPosition?: ETooltipPosition;
158
183
  classNameBaseTooltipContentRoot?: string;
184
+ classNameBaseTooltipRoot?: string;
159
185
  }
160
186
 
161
187
  export declare enum ETooltipPosition {
@@ -176,6 +202,7 @@ export declare enum ETooltipPosition {
176
202
  export declare const Form: default_2.FC<FormProps>;
177
203
 
178
204
  export declare interface FormProps extends default_2.PropsWithChildren {
205
+ size?: "md" | "lg";
179
206
  withSeparator?: boolean;
180
207
  classNameRoot?: string;
181
208
  addMargin?: boolean;
@@ -278,14 +305,15 @@ export declare const Modal: default_2.FC<ModalProps>;
278
305
 
279
306
  export declare interface ModalProps extends default_2.PropsWithChildren {
280
307
  zIndex: number;
308
+ align?: TModalAlign;
281
309
  isHiddenModal?: boolean;
282
310
  isVisibleCloseButton?: boolean;
283
311
  classNameRoot?: string;
284
312
  classNameLayerRoot?: string;
285
- modalName: string;
313
+ header: string | ReactNode;
314
+ footer?: ReactNode;
286
315
  style?: CSSProperties;
287
316
  subHeader?: ReactNode;
288
- align?: "center" | "top";
289
317
  onClose: (event: default_2.MouseEvent<HTMLButtonElement>) => void;
290
318
  }
291
319
 
@@ -296,7 +324,8 @@ export { PlusSquareIcon }
296
324
  export declare const Portal: default_2.FC<PortalProps>;
297
325
 
298
326
  export declare interface PortalProps extends default_2.PropsWithChildren {
299
- node: Element | DocumentFragment;
327
+ node?: Element | DocumentFragment | null;
328
+ classNameRoot?: string;
300
329
  }
301
330
 
302
331
  export declare const Select: default_2.FC<SelectProps>;
@@ -327,6 +356,16 @@ export declare interface SelectProps {
327
356
  classNameLabel?: string;
328
357
  }
329
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
+
330
369
  export declare type SVGComponent = default_2.FC<default_2.SVGProps<SVGSVGElement>>;
331
370
 
332
371
  export declare const Table: default_2.FC<TableProps>;
@@ -346,6 +385,10 @@ export declare interface TabsProps {
346
385
  classNameRoot?: string;
347
386
  }
348
387
 
388
+ declare type TApplyButtonsAlign = "left" | "center" | "right";
389
+
390
+ declare type TApplyButtonsMobile = "row" | "column";
391
+
349
392
  export declare type TBreakpoints = {
350
393
  desktop: {
351
394
  minWidth: number;
@@ -365,11 +408,11 @@ export declare type TButtonType = "submit" | "reset" | "button";
365
408
 
366
409
  export declare type TButtonVariant = "primary" | "secondary" | "link";
367
410
 
368
- export declare type TContextMenuItem = {
411
+ export declare type TContextMenuOption = {
369
412
  key?: string;
413
+ value?: string;
370
414
  label?: string;
371
415
  iconName?: EIconName;
372
- onClick?: (id?: string) => void;
373
416
  };
374
417
 
375
418
  export declare type TDropdownListItem = {
@@ -402,12 +445,15 @@ export declare interface TextWithLabelProps extends TextProps {
402
445
  label: string;
403
446
  }
404
447
 
448
+ declare type TModalAlign = "center" | "top";
449
+
405
450
  export declare const Tooltip: default_2.FC<TooltipProps>;
406
451
 
407
452
  export declare interface TooltipProps extends Omit<BaseTooltipProps, "classNameRoot" | "classNameContentRoot"> {
408
453
  hover?: boolean;
409
454
  isToggleClick?: boolean;
410
455
  isVisibleTooltip?: boolean;
456
+ position?: ETooltipPosition;
411
457
  trigger?: default_2.ReactNode;
412
458
  triggerAction?: () => void;
413
459
  actionOnClose?: () => void;
@@ -452,11 +498,6 @@ export declare type TTableRowsDataItem = {
452
498
 
453
499
  export { UploadIcon }
454
500
 
455
- export declare const useContentHeight: (open: boolean) => {
456
- contentRef: MutableRefObject<HTMLDivElement | null>;
457
- height: string;
458
- };
459
-
460
501
  export declare const useMediaContext: (breakpoints: TBreakpoints) => {
461
502
  device: {
462
503
  isDesktop: boolean;
@@ -471,7 +512,7 @@ export declare const useModal: (params?: UseModalParams) => {
471
512
  [name: string]: any;
472
513
  } | null;
473
514
  onOpenModal: (modalData: {
474
- [name: string]: boolean | Object;
515
+ [name: string]: boolean | NonNullable<unknown>;
475
516
  }) => void;
476
517
  onCloseModal: () => void;
477
518
  };