@reportportal/ui-kit 0.0.1-alpha.7 → 0.0.1-alpha.9

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.
Files changed (91) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +197 -3
  3. package/dist/baseIconButton-7bc53dec.js +25 -0
  4. package/dist/baseIconButton.js +7 -0
  5. package/dist/bubblesLoader-a7e709d4.js +17 -0
  6. package/dist/bubblesLoader.js +1 -1
  7. package/dist/button-7fb84fde.js +62 -0
  8. package/dist/button.js +1 -1
  9. package/dist/checkbox-4143390f.js +70 -0
  10. package/dist/checkbox.js +1 -1
  11. package/dist/components/button/button.d.ts +0 -1
  12. package/dist/components/button/index.d.ts +2 -2
  13. package/dist/components/checkbox/checkbox.d.ts +1 -0
  14. package/dist/components/dropdown/constants.d.ts +4 -0
  15. package/dist/components/dropdown/dropdown.d.ts +0 -1
  16. package/dist/components/fieldText/fieldText.d.ts +1 -0
  17. package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +14 -0
  18. package/dist/components/fieldTextFlex/index.d.ts +3 -0
  19. package/dist/components/icons/baseIconButton/baseIconButton.d.ts +8 -0
  20. package/dist/components/icons/baseIconButton/index.d.ts +4 -0
  21. package/dist/components/icons/index.d.ts +12 -0
  22. package/dist/components/index.d.ts +6 -1
  23. package/dist/components/modal/modal.d.ts +3 -1
  24. package/dist/components/pagination/index.d.ts +4 -0
  25. package/dist/components/pagination/itemsCounter/index.d.ts +1 -0
  26. package/dist/components/pagination/itemsCounter/itemCounter.d.ts +9 -0
  27. package/dist/components/pagination/pageControls/activePage/activePage.d.ts +12 -0
  28. package/dist/components/pagination/pageControls/activePage/index.d.ts +1 -0
  29. package/dist/components/pagination/pageControls/activePage/pageSelector/index.d.ts +1 -0
  30. package/dist/components/pagination/pageControls/activePage/pageSelector/pageSelector.d.ts +10 -0
  31. package/dist/components/pagination/pageControls/index.d.ts +1 -0
  32. package/dist/components/pagination/pageControls/pageControls.d.ts +16 -0
  33. package/dist/components/pagination/pageControls/pageNavigator/index.d.ts +1 -0
  34. package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +8 -0
  35. package/dist/components/pagination/pageSizeControl/index.d.ts +1 -0
  36. package/dist/components/pagination/pageSizeControl/pageSizeControl.d.ts +10 -0
  37. package/dist/components/pagination/pageSizeControl/sizeSelector/index.d.ts +1 -0
  38. package/dist/components/pagination/pageSizeControl/sizeSelector/sizeSelector.d.ts +8 -0
  39. package/dist/components/pagination/pagination.d.ts +22 -0
  40. package/dist/components/pagination/types.d.ts +2 -0
  41. package/dist/components/popover/index.d.ts +1 -0
  42. package/dist/components/popover/popover.d.ts +18 -0
  43. package/dist/components/radio/index.d.ts +4 -0
  44. package/dist/components/radio/radio.d.ts +16 -0
  45. package/dist/components/radio/radioGroup.d.ts +8 -0
  46. package/dist/components/table/index.d.ts +3 -0
  47. package/dist/components/table/table.d.ts +3 -0
  48. package/dist/components/table/types.d.ts +46 -0
  49. package/dist/components/table/utils.d.ts +2 -0
  50. package/dist/components/themeProvider/themeProvider.d.ts +2 -1
  51. package/dist/components/tooltip/index.d.ts +1 -0
  52. package/dist/components/tooltip/tooltip.d.ts +13 -0
  53. package/dist/dropdown-e07f2a71.js +212 -0
  54. package/dist/dropdown.js +3 -4
  55. package/dist/fieldNumber-46fe79b9.js +127 -0
  56. package/dist/fieldNumber.js +2 -3
  57. package/dist/fieldText-d80b29ba.js +102 -0
  58. package/dist/fieldText.js +2 -2
  59. package/dist/fieldTextFlex-5bddf46a.js +67 -0
  60. package/dist/fieldTextFlex.js +8 -0
  61. package/dist/index-bb9b62ef.js +131 -0
  62. package/dist/index.js +46 -24
  63. package/dist/modal.js +14 -126
  64. package/dist/pagination-a36bc786.js +274 -0
  65. package/dist/pagination.js +13 -0
  66. package/dist/popover.js +95 -0
  67. package/dist/radio-fd49a09c.js +76 -0
  68. package/dist/{icon.js → radio.js} +4 -4
  69. package/dist/style.css +1 -1
  70. package/dist/systemMessage-1ced6079.js +30 -0
  71. package/dist/systemMessage.js +1 -1
  72. package/dist/themeProvider-46c2be7b.js +23 -0
  73. package/dist/themeProvider.js +4 -3
  74. package/dist/toggle-707ecb74.js +67 -0
  75. package/dist/toggle.js +1 -1
  76. package/dist/tooltip.js +70 -0
  77. package/package.json +30 -6
  78. package/dist/bubblesLoader-9bec3797.js +0 -17
  79. package/dist/button-d4944dbc.js +0 -64
  80. package/dist/checkbox-fdc44740.js +0 -68
  81. package/dist/clear-4963efcd.js +0 -5
  82. package/dist/components/icon/icon.d.ts +0 -11
  83. package/dist/components/icon/icons.d.ts +0 -21
  84. package/dist/components/icon/index.d.ts +0 -3
  85. package/dist/dropdown-45e7bc7d.js +0 -204
  86. package/dist/fieldNumber-27e69676.js +0 -132
  87. package/dist/fieldText-c7085849.js +0 -99
  88. package/dist/icon-71262f5c.js +0 -26
  89. package/dist/systemMessage-62c3133d.js +0 -30
  90. package/dist/themeProvider-5800417e.js +0 -19
  91. package/dist/toggle-5b3d8333.js +0 -67
@@ -0,0 +1,17 @@
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { c as a } from "./bind-06a7ff84.js";
3
+ const n = "_bubble_kn4ln_1", c = "_bubbles_kn4ln_1", r = {
4
+ "bubbles-loader": "_bubbles-loader_kn4ln_1",
5
+ "color-topaz": "_color-topaz_kn4ln_4",
6
+ bubble: n,
7
+ bubbles: c
8
+ }, s = a.bind(r), _ = 7, i = ({
9
+ color: b = "topaz",
10
+ className: o
11
+ }) => /* @__PURE__ */ l("div", { className: s("bubbles-loader", o, { [`color-${b}`]: b }), children: Array(_).fill(void 0).map((t, e) => (
12
+ // eslint-disable-next-line react/no-array-index-key
13
+ /* @__PURE__ */ l("div", { className: s("bubble") }, e)
14
+ )) });
15
+ export {
16
+ i as B
17
+ };
@@ -1,4 +1,4 @@
1
- import { B as r } from "./bubblesLoader-9bec3797.js";
1
+ import { B as r } from "./bubblesLoader-a7e709d4.js";
2
2
  import "react/jsx-runtime";
3
3
  import "./bind-06a7ff84.js";
4
4
  export {
@@ -0,0 +1,62 @@
1
+ import { jsxs as p, jsx as h } from "react/jsx-runtime";
2
+ import { forwardRef as l } from "react";
3
+ import { c as u } from "./bind-06a7ff84.js";
4
+ const w = "_button_1fbsg_1", x = "_primary_1fbsg_18", y = "_disabled_1fbsg_23", N = "_ghost_1fbsg_35", B = "_danger_1fbsg_53", $ = "_text_1fbsg_69", j = "_icon_1fbsg_115", I = {
5
+ button: w,
6
+ primary: x,
7
+ disabled: y,
8
+ ghost: N,
9
+ danger: B,
10
+ text: $,
11
+ "width-wide-content": "_width-wide-content_1fbsg_105",
12
+ "width-parent": "_width-parent_1fbsg_110",
13
+ icon: j,
14
+ "icon-start": "_icon-start_1fbsg_121",
15
+ "icon-end": "_icon-end_1fbsg_125"
16
+ }, c = u.bind(I), z = l(
17
+ ({
18
+ variant: t = "primary",
19
+ icon: e,
20
+ iconPlace: s = "start",
21
+ adjustWidthOn: n = "content",
22
+ type: r = "button",
23
+ children: i,
24
+ disabled: o = !1,
25
+ onClick: a,
26
+ title: b,
27
+ className: d,
28
+ ...f
29
+ }, g) => {
30
+ const m = c("button", t, d, {
31
+ disabled: o,
32
+ [`width-${n}`]: n
33
+ }), _ = t === "text" && e;
34
+ return /* @__PURE__ */ p(
35
+ "button",
36
+ {
37
+ ref: g,
38
+ type: r,
39
+ disabled: o,
40
+ className: m,
41
+ onClick: a,
42
+ title: b,
43
+ ...f,
44
+ children: [
45
+ _ && /* @__PURE__ */ h(
46
+ "i",
47
+ {
48
+ className: c("icon", {
49
+ [`icon-${s}`]: s
50
+ }),
51
+ children: _
52
+ }
53
+ ),
54
+ i
55
+ ]
56
+ }
57
+ );
58
+ }
59
+ );
60
+ export {
61
+ z as B
62
+ };
package/dist/button.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as o } from "./button-d4944dbc.js";
1
+ import { B as o } from "./button-7fb84fde.js";
2
2
  import "react/jsx-runtime";
3
3
  import "react";
4
4
  import "./bind-06a7ff84.js";
@@ -0,0 +1,70 @@
1
+ import { jsxs as u, jsx as n } from "react/jsx-runtime";
2
+ import { c as x } from "./bind-06a7ff84.js";
3
+ import { useRef as m } from "react";
4
+ import { K as k } from "./keyCodes-f63c0e11.js";
5
+ const f = "_checkbox_189ko_1", y = "_disabled_189ko_11", C = "_input_189ko_16", E = "_control_189ko_23", D = "_children_189ko_149", K = {
6
+ checkbox: f,
7
+ disabled: y,
8
+ input: C,
9
+ control: E,
10
+ "partially-checked": "_partially-checked_189ko_76",
11
+ children: D
12
+ }, e = x.bind(K), O = ({
13
+ children: l,
14
+ disabled: c = !1,
15
+ onChange: _,
16
+ className: p,
17
+ value: r,
18
+ partiallyChecked: h,
19
+ ...b
20
+ }) => {
21
+ const o = m(null), d = (t) => {
22
+ var a, i;
23
+ const { keyCode: s } = t;
24
+ if (s === k.SPACE_KEY_CODE) {
25
+ t.preventDefault(), (a = o.current) == null || a.click();
26
+ return;
27
+ }
28
+ s === k.ENTER_KEY_CODE && (t.preventDefault(), (i = o.current) == null || i.click());
29
+ };
30
+ return /* @__PURE__ */ u(
31
+ "label",
32
+ {
33
+ id: "rp-ui-kit-checkbox-label",
34
+ className: e("checkbox", p, {
35
+ disabled: c
36
+ }),
37
+ children: [
38
+ /* @__PURE__ */ n(
39
+ "input",
40
+ {
41
+ ref: o,
42
+ tabIndex: 0,
43
+ type: "checkbox",
44
+ onKeyDown: d,
45
+ className: e("input", { "partially-checked": h }),
46
+ disabled: c,
47
+ onChange: _,
48
+ checked: r,
49
+ ...b
50
+ }
51
+ ),
52
+ /* @__PURE__ */ n(
53
+ "span",
54
+ {
55
+ "aria-labelledby": "rp-ui-kit-checkbox-label",
56
+ role: "checkbox",
57
+ "aria-checked": r,
58
+ className: e("control", {
59
+ disabled: c
60
+ })
61
+ }
62
+ ),
63
+ l && /* @__PURE__ */ n("span", { className: e("children", { disabled: c }), children: l })
64
+ ]
65
+ }
66
+ );
67
+ };
68
+ export {
69
+ O as C
70
+ };
package/dist/checkbox.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as r } from "./checkbox-fdc44740.js";
1
+ import { C as r } from "./checkbox-4143390f.js";
2
2
  import "react/jsx-runtime";
3
3
  import "./bind-06a7ff84.js";
4
4
  import "react";
@@ -6,7 +6,6 @@ export interface ButtonProps extends ComponentPropsWithRef<'button'> {
6
6
  children?: ReactNode;
7
7
  icon?: ReactNode;
8
8
  iconPlace?: IconPlace;
9
- dataAutomationId?: string;
10
9
  adjustWidthOn?: ButtonWidth;
11
10
  disabled?: boolean;
12
11
  type?: 'submit' | 'reset' | 'button';
@@ -1,4 +1,4 @@
1
- import { Button } from './button';
1
+ import { Button, ButtonProps } from './button';
2
2
  export { Button };
3
- export type { ButtonProps } from './button';
3
+ export type { ButtonProps };
4
4
  export default Button;
@@ -5,6 +5,7 @@ interface CheckboxProps extends HTMLAttributes<HTMLInputElement> {
5
5
  disabled?: boolean;
6
6
  className?: string;
7
7
  onChange?: ChangeEventHandler<HTMLInputElement>;
8
+ partiallyChecked?: boolean;
8
9
  }
9
10
  export declare const Checkbox: FC<CheckboxProps>;
10
11
  export {};
@@ -1,3 +1,7 @@
1
1
  import { KeyCodes } from '../../common/constants/keyCodes';
2
2
  export declare const OPEN_DROPDOWN_KEY_CODES: KeyCodes[];
3
3
  export declare const CLOSE_DROPDOWN_KEY_CODES: KeyCodes[];
4
+ export declare enum EventName {
5
+ ON_KEY_DOWN = "onKeyDown",
6
+ ON_CLICK = "onClick"
7
+ }
@@ -11,7 +11,6 @@ interface DropdownProps {
11
11
  icon?: ReactNode;
12
12
  variant?: DropdownVariant;
13
13
  placeholder?: string;
14
- defaultWidth?: boolean;
15
14
  transparentBackground?: boolean;
16
15
  className?: string;
17
16
  toggleButtonClassName?: string;
@@ -18,6 +18,7 @@ interface FieldTextProps extends ComponentPropsWithRef<'input'> {
18
18
  isRequired?: boolean;
19
19
  hasDoubleMessage?: boolean;
20
20
  type?: string;
21
+ displayError?: boolean;
21
22
  }
22
23
  export declare const FieldText: FC<FieldTextProps>;
23
24
  export {};
@@ -0,0 +1,14 @@
1
+ import { ChangeEventHandler, ComponentPropsWithRef, FC, FocusEventHandler, KeyboardEventHandler } from 'react';
2
+ export interface FieldTextFlexProps extends ComponentPropsWithRef<'textarea'> {
3
+ value: string;
4
+ readonly?: boolean;
5
+ error?: string;
6
+ touched?: boolean;
7
+ label?: string;
8
+ helpText?: string;
9
+ onChange?: ChangeEventHandler<HTMLTextAreaElement>;
10
+ onFocus?: FocusEventHandler<HTMLTextAreaElement>;
11
+ onBlur?: FocusEventHandler<HTMLTextAreaElement>;
12
+ onKeyUp?: KeyboardEventHandler<HTMLTextAreaElement>;
13
+ }
14
+ export declare const FieldTextFlex: FC<FieldTextFlexProps>;
@@ -0,0 +1,3 @@
1
+ import { FieldTextFlex } from './fieldTextFlex';
2
+ export { FieldTextFlex };
3
+ export default FieldTextFlex;
@@ -0,0 +1,8 @@
1
+ import { FC, MouseEventHandler, ReactNode, HTMLAttributes } from 'react';
2
+ export interface BaseIconButtonProps extends HTMLAttributes<HTMLButtonElement> {
3
+ children: ReactNode;
4
+ className?: string;
5
+ disabled?: boolean;
6
+ onClick?: MouseEventHandler<HTMLButtonElement>;
7
+ }
8
+ export declare const BaseIconButton: FC<BaseIconButtonProps>;
@@ -0,0 +1,4 @@
1
+ import { BaseIconButton, BaseIconButtonProps } from './baseIconButton';
2
+ export { BaseIconButton };
3
+ export type { BaseIconButtonProps };
4
+ export default BaseIconButton;
@@ -0,0 +1,12 @@
1
+ export { BaseIconButton } from './baseIconButton';
2
+ export { default as ClearIcon } from './svg/clear.svg';
3
+ export { default as CloseIcon } from './svg/close.svg';
4
+ export { default as PlusIcon } from './svg/plus.svg';
5
+ export { default as MinusIcon } from './svg/minus.svg';
6
+ export { default as DeleteIcon } from './svg/delete.svg';
7
+ export { default as DropdownIcon } from './svg/dropdown.svg';
8
+ export { default as PrevPageIcon } from './svg/prevPage.svg';
9
+ export { default as PrevChapterIcon } from './svg/prevChapter.svg';
10
+ export { default as ArrowDownIcon } from './svg/arrowDown.svg';
11
+ export { default as ArrowUpIcon } from './svg/arrowUp.svg';
12
+ export { default as MeatballMenuIcon } from './svg/meatballMenu.svg';
@@ -6,6 +6,11 @@ export { ThemeProvider } from './themeProvider';
6
6
  export { Modal } from './modal';
7
7
  export { Dropdown } from './dropdown';
8
8
  export { Toggle } from './toggle';
9
- export { Icon } from './icon';
10
9
  export { FieldNumber } from './fieldNumber';
11
10
  export { BubblesLoader } from './bubblesLoader';
11
+ export { FieldTextFlex } from './fieldTextFlex';
12
+ export { Radio } from './radio';
13
+ export { Tooltip } from './tooltip';
14
+ export { Popover } from './popover';
15
+ export { Pagination } from './pagination';
16
+ export * from './icons';
@@ -3,17 +3,19 @@ import { ButtonProps } from '../button';
3
3
  import { ModalSize } from './modalFooter';
4
4
  type ModalOverlay = 'default' | 'light-cyan';
5
5
  interface ModalProps {
6
+ onClose: () => void;
6
7
  title?: ReactNode;
7
8
  headerNode?: ReactNode;
8
9
  children?: ReactNode;
9
10
  footerNode?: ReactNode;
10
11
  className?: string;
12
+ zIndex?: number;
11
13
  size?: ModalSize;
12
14
  overlay?: ModalOverlay;
13
15
  allowCloseOutside?: boolean;
14
16
  okButton?: ButtonProps;
15
17
  cancelButton?: ButtonProps;
16
- onClose: () => void;
18
+ scrollable?: boolean;
17
19
  }
18
20
  export declare const Modal: FC<ModalProps>;
19
21
  export {};
@@ -0,0 +1,4 @@
1
+ import { Pagination, PaginationProps } from './pagination';
2
+ export { Pagination };
3
+ export type { PaginationProps };
4
+ export default Pagination;
@@ -0,0 +1 @@
1
+ export { ItemCounter } from './itemCounter';
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ export interface ItemCounterProps {
3
+ activePage: number;
4
+ pageSize: number;
5
+ totalItems: number;
6
+ ofText: string;
7
+ itemsText: string;
8
+ }
9
+ export declare const ItemCounter: FC<ItemCounterProps>;
@@ -0,0 +1,12 @@
1
+ import { FC } from 'react';
2
+ import { ChangePage } from '../../types';
3
+ interface ActivePageProps {
4
+ activePage: number;
5
+ totalPages: number;
6
+ pageText: string;
7
+ goToText: string;
8
+ goActionText: string;
9
+ changePage: ChangePage;
10
+ }
11
+ export declare const ActivePage: FC<ActivePageProps>;
12
+ export {};
@@ -0,0 +1 @@
1
+ export { ActivePage } from './activePage';
@@ -0,0 +1 @@
1
+ export { PageSelector } from './pageSelector';
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import { ChangePage } from '../../../types';
3
+ interface PageSelectorProps {
4
+ pageText: string;
5
+ goActionText: string;
6
+ totalPages: number;
7
+ selectPage: ChangePage;
8
+ }
9
+ export declare const PageSelector: FC<PageSelectorProps>;
10
+ export {};
@@ -0,0 +1 @@
1
+ export { PageControls } from './pageControls';
@@ -0,0 +1,16 @@
1
+ import { FC } from 'react';
2
+ import { ChangePage } from '../types';
3
+ type PageControlsCaptions = {
4
+ page: string;
5
+ goTo: string;
6
+ goAction: string;
7
+ of: string;
8
+ };
9
+ export interface PageControlsProps {
10
+ activePage: number;
11
+ totalPages: number;
12
+ changePage: ChangePage;
13
+ captions: PageControlsCaptions;
14
+ }
15
+ export declare const PageControls: FC<PageControlsProps>;
16
+ export {};
@@ -0,0 +1 @@
1
+ export { PageNavigator } from './pageNavigator';
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ import { ChangePage } from '../../types';
3
+ export interface PageNavigatorProps {
4
+ activePage: number;
5
+ totalPages: number;
6
+ changePage: ChangePage;
7
+ }
8
+ export declare const PageNavigator: FC<PageNavigatorProps>;
@@ -0,0 +1 @@
1
+ export { PageSizeControl } from './pageSizeControl';
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import { ChangePageSize } from '../types';
3
+ interface PageSizeControlProps {
4
+ size: number;
5
+ sizeOptions: number[];
6
+ perPageText: string;
7
+ changeSize: ChangePageSize;
8
+ }
9
+ export declare const PageSizeControl: FC<PageSizeControlProps>;
10
+ export {};
@@ -0,0 +1 @@
1
+ export { SizeSelector } from './sizeSelector';
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ import { ChangePageSize } from '../../types';
3
+ export interface SizeSelectorProps {
4
+ currentSize: number;
5
+ options: number[];
6
+ onClickOption: ChangePageSize;
7
+ }
8
+ export declare const SizeSelector: FC<SizeSelectorProps>;
@@ -0,0 +1,22 @@
1
+ import { FC } from 'react';
2
+ import { ChangePageSize, ChangePage } from './types';
3
+ type PaginationCaptions = {
4
+ items?: string;
5
+ of?: string;
6
+ page?: string;
7
+ goTo?: string;
8
+ goAction?: string;
9
+ perPage?: string;
10
+ };
11
+ export interface PaginationProps {
12
+ activePage: number;
13
+ totalPages: number;
14
+ pageSize: number;
15
+ totalItems: number;
16
+ pageSizeOptions: number[];
17
+ changePage: ChangePage;
18
+ changePageSize: ChangePageSize;
19
+ captions?: PaginationCaptions;
20
+ }
21
+ export declare const Pagination: FC<PaginationProps>;
22
+ export {};
@@ -0,0 +1,2 @@
1
+ export type ChangePage = (page: number) => void;
2
+ export type ChangePageSize = (size: number) => void;
@@ -0,0 +1 @@
1
+ export { Popover } from './popover';
@@ -0,0 +1,18 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { Placement } from '@floating-ui/react';
3
+ interface PopoverProps {
4
+ className?: string;
5
+ content: ReactNode;
6
+ children: ReactNode;
7
+ placement?: Placement;
8
+ fallbackPlacements?: Placement[];
9
+ title?: string;
10
+ arrowOffset?: number;
11
+ safeZone?: number;
12
+ arrowColor?: string;
13
+ dataAutomationId?: string;
14
+ isOpened?: boolean;
15
+ setIsOpened?: (isOpened: boolean) => void;
16
+ }
17
+ export declare const Popover: FC<PopoverProps>;
18
+ export {};
@@ -0,0 +1,4 @@
1
+ import { Radio, RadioProps } from './radio.js';
2
+ export { Radio };
3
+ export type { RadioProps };
4
+ export default Radio;
@@ -0,0 +1,16 @@
1
+ import { ChangeEventHandler, HTMLAttributes, ReactNode, FC } from 'react';
2
+ export type RadioValue = string | number;
3
+ export type RadioOption = {
4
+ value: RadioValue;
5
+ label: string;
6
+ disabled: boolean;
7
+ };
8
+ export interface RadioProps extends HTMLAttributes<HTMLInputElement> {
9
+ option: RadioOption;
10
+ value?: RadioValue;
11
+ children?: ReactNode;
12
+ className?: string;
13
+ disabled?: boolean;
14
+ onChange?: ChangeEventHandler<HTMLInputElement>;
15
+ }
16
+ export declare const Radio: FC<RadioProps>;
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ import { RadioProps } from './index';
3
+ import { RadioOption } from './radio';
4
+ interface RadioGroupProps extends Omit<RadioProps, 'option'> {
5
+ options: RadioOption[];
6
+ }
7
+ export declare const RadioGroup: FC<RadioGroupProps>;
8
+ export {};
@@ -0,0 +1,3 @@
1
+ import { Table } from './table';
2
+ export { Table };
3
+ export default Table;
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { TableComponentProps } from './types';
3
+ export declare const Table: FC<TableComponentProps>;
@@ -0,0 +1,46 @@
1
+ import { ReactNode } from 'react';
2
+ export interface Column {
3
+ key: string;
4
+ header: string;
5
+ }
6
+ export interface PrimaryColumn extends Column {
7
+ primary: boolean;
8
+ }
9
+ export interface FixedColumn extends Column {
10
+ width: string | number;
11
+ align?: 'left' | 'center' | 'right';
12
+ }
13
+ export interface RowConfigs {
14
+ size?: 'small' | 'medium' | 'large';
15
+ }
16
+ export interface DetailedCellData {
17
+ content: string | number;
18
+ component: ReactNode;
19
+ }
20
+ export interface RowData {
21
+ id: string | number;
22
+ [key: string]: DetailedCellData | RowConfigs | string | number | any;
23
+ rowConfigs?: RowConfigs;
24
+ }
25
+ export declare enum SortDirection {
26
+ ASC = "asc",
27
+ DESC = "desc"
28
+ }
29
+ export interface SortConfig {
30
+ key: string;
31
+ direction: SortDirection;
32
+ }
33
+ export interface TableComponentProps {
34
+ data: RowData[];
35
+ primaryColumn: Column;
36
+ fixedColumns: FixedColumn[];
37
+ rowActionMenu?: ReactNode;
38
+ selectable?: boolean;
39
+ className?: string;
40
+ selectedRowIds?: (string | number)[];
41
+ sortingDirection?: SortDirection;
42
+ sortingColumn?: Column;
43
+ onChangeSorting?: (sortConfig?: SortConfig) => void;
44
+ onToggleRowSelection?: (id: string | number) => void;
45
+ onToggleAllRowsSelection?: () => void;
46
+ }
@@ -0,0 +1,2 @@
1
+ import { RowData, SortConfig } from './types';
2
+ export declare const sortTableData: (tableData: RowData[], sortConfig?: SortConfig) => RowData[];
@@ -7,6 +7,7 @@ interface IThemeProviderProps {
7
7
  children?: ReactNode;
8
8
  theme?: ThemeKey;
9
9
  customThemes?: ITheme;
10
+ className?: string;
10
11
  }
11
- export declare function ThemeProvider({ children, theme, customThemes, }: IThemeProviderProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function ThemeProvider({ children, theme, customThemes, className, }: IThemeProviderProps): import("react/jsx-runtime").JSX.Element;
12
13
  export {};
@@ -0,0 +1 @@
1
+ export { Tooltip } from './tooltip';
@@ -0,0 +1,13 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { Placement } from '@floating-ui/react-dom';
3
+ interface TooltipProps {
4
+ content: ReactNode;
5
+ children: ReactNode;
6
+ className?: string;
7
+ dynamicWidth?: boolean;
8
+ width?: number;
9
+ placement?: Placement;
10
+ dataAutomationId?: string;
11
+ }
12
+ export declare const Tooltip: FC<TooltipProps>;
13
+ export {};