@reportportal/ui-kit 0.0.1-alpha.3 → 0.0.1-alpha.31

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 (113) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +229 -3
  3. package/dist/baseIconButton-b6adc843.js +25 -0
  4. package/dist/baseIconButton.js +7 -0
  5. package/dist/bind-06a7ff84.js +41 -0
  6. package/dist/bubblesLoader-a7e709d4.js +17 -0
  7. package/dist/bubblesLoader.js +7 -0
  8. package/dist/button-33c88abf.js +62 -0
  9. package/dist/button.js +2 -2
  10. package/dist/checkbox-9a6c7ce1.js +73 -0
  11. package/dist/checkbox.js +3 -3
  12. package/dist/common/constants/keyCodes.d.ts +24 -0
  13. package/dist/components/bubblesLoader/bubblesLoader.d.ts +7 -0
  14. package/dist/components/bubblesLoader/index.d.ts +3 -0
  15. package/dist/components/button/button.d.ts +2 -3
  16. package/dist/components/button/index.d.ts +2 -2
  17. package/dist/components/checkbox/checkbox.d.ts +2 -1
  18. package/dist/components/datePicker/datePicker.d.ts +24 -0
  19. package/dist/components/datePicker/header/datePickerHeader.d.ts +15 -0
  20. package/dist/components/datePicker/header/index.d.ts +3 -0
  21. package/dist/components/datePicker/index.d.ts +3 -0
  22. package/dist/components/datePicker/utils.d.ts +3 -0
  23. package/dist/components/dropdown/constants.d.ts +7 -0
  24. package/dist/components/dropdown/dropdown.d.ts +24 -0
  25. package/dist/components/dropdown/dropdownOption/dropdownOption.d.ts +3 -0
  26. package/dist/components/dropdown/dropdownOption/index.d.ts +3 -0
  27. package/dist/components/dropdown/index.d.ts +3 -0
  28. package/dist/components/dropdown/types.d.ts +20 -0
  29. package/dist/components/dropdown/utils.d.ts +4 -0
  30. package/dist/components/fieldNumber/constants.d.ts +4 -0
  31. package/dist/components/fieldNumber/fieldNumber.d.ts +18 -0
  32. package/dist/components/fieldNumber/index.d.ts +3 -0
  33. package/dist/components/fieldText/fieldText.d.ts +8 -3
  34. package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +14 -0
  35. package/dist/components/fieldTextFlex/index.d.ts +3 -0
  36. package/dist/components/icons/baseIconButton/baseIconButton.d.ts +8 -0
  37. package/dist/components/icons/baseIconButton/index.d.ts +4 -0
  38. package/dist/components/icons/index.d.ts +15 -0
  39. package/dist/components/index.d.ts +13 -0
  40. package/dist/components/modal/modal.d.ts +6 -2
  41. package/dist/components/modal/modalContent/modalContent.d.ts +1 -0
  42. package/dist/components/modal/modalHeader/modalHeader.d.ts +1 -1
  43. package/dist/components/pagination/index.d.ts +4 -0
  44. package/dist/components/pagination/itemsCounter/index.d.ts +1 -0
  45. package/dist/components/pagination/itemsCounter/itemCounter.d.ts +9 -0
  46. package/dist/components/pagination/pageControls/activePage/activePage.d.ts +12 -0
  47. package/dist/components/pagination/pageControls/activePage/index.d.ts +1 -0
  48. package/dist/components/pagination/pageControls/activePage/pageSelector/index.d.ts +1 -0
  49. package/dist/components/pagination/pageControls/activePage/pageSelector/pageSelector.d.ts +10 -0
  50. package/dist/components/pagination/pageControls/index.d.ts +1 -0
  51. package/dist/components/pagination/pageControls/pageControls.d.ts +16 -0
  52. package/dist/components/pagination/pageControls/pageNavigator/bar/bar.d.ts +11 -0
  53. package/dist/components/pagination/pageControls/pageNavigator/bar/index.d.ts +1 -0
  54. package/dist/components/pagination/pageControls/pageNavigator/index.d.ts +1 -0
  55. package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +11 -0
  56. package/dist/components/pagination/pageSizeControl/index.d.ts +1 -0
  57. package/dist/components/pagination/pageSizeControl/pageSizeControl.d.ts +10 -0
  58. package/dist/components/pagination/pageSizeControl/sizeSelector/index.d.ts +1 -0
  59. package/dist/components/pagination/pageSizeControl/sizeSelector/sizeSelector.d.ts +8 -0
  60. package/dist/components/pagination/pagination.d.ts +22 -0
  61. package/dist/components/pagination/types.d.ts +2 -0
  62. package/dist/components/popover/index.d.ts +1 -0
  63. package/dist/components/popover/popover.d.ts +18 -0
  64. package/dist/components/radio/index.d.ts +4 -0
  65. package/dist/components/radio/radio.d.ts +16 -0
  66. package/dist/components/radio/radioGroup.d.ts +8 -0
  67. package/dist/components/spinLoader/index.d.ts +3 -0
  68. package/dist/components/spinLoader/spinLoader.d.ts +7 -0
  69. package/dist/components/table/index.d.ts +3 -0
  70. package/dist/components/table/table.d.ts +3 -0
  71. package/dist/components/table/types.d.ts +49 -0
  72. package/dist/components/table/utils.d.ts +3 -0
  73. package/dist/components/themeProvider/themeProvider.d.ts +2 -1
  74. package/dist/components/toggle/index.d.ts +3 -0
  75. package/dist/components/toggle/toggle.d.ts +11 -0
  76. package/dist/components/tooltip/index.d.ts +1 -0
  77. package/dist/components/tooltip/tooltip.d.ts +19 -0
  78. package/dist/dropdown-c21b0d67.js +216 -0
  79. package/dist/dropdown.js +14 -0
  80. package/dist/fieldNumber-1f286b40.js +127 -0
  81. package/dist/fieldNumber.js +10 -0
  82. package/dist/fieldText-14bf032f.js +133 -0
  83. package/dist/fieldText.js +3 -2
  84. package/dist/fieldTextFlex-5bddf46a.js +67 -0
  85. package/dist/fieldTextFlex.js +8 -0
  86. package/dist/index-54e3bfc2.js +147 -0
  87. package/dist/index.js +245 -16
  88. package/dist/keyCodes-f63c0e11.js +4 -0
  89. package/dist/modal.js +14 -135
  90. package/dist/pagination-ac3ea7c4.js +346 -0
  91. package/dist/pagination.js +14 -0
  92. package/dist/popover.js +95 -0
  93. package/dist/radio-bccc84f2.js +76 -0
  94. package/dist/radio.js +9 -0
  95. package/dist/style.css +1 -1
  96. package/dist/systemMessage-1ced6079.js +30 -0
  97. package/dist/systemMessage.js +2 -2
  98. package/dist/table-cb8f9516.js +147 -0
  99. package/dist/table.js +11 -0
  100. package/dist/themeProvider-46c2be7b.js +23 -0
  101. package/dist/themeProvider.js +4 -3
  102. package/dist/toggle-4cdbcc42.js +59 -0
  103. package/dist/toggle.js +9 -0
  104. package/dist/tooltip.js +96 -0
  105. package/dist/useOnClickOutside-c332f7d3.js +16 -0
  106. package/package.json +96 -66
  107. package/dist/button-15f7c4a6.js +0 -64
  108. package/dist/checkbox-e6a5c84a.js +0 -70
  109. package/dist/common/constants/key-codes.d.ts +0 -5
  110. package/dist/fieldText-dc43f641.js +0 -99
  111. package/dist/key-codes-abbe7725.js +0 -4
  112. package/dist/systemMessage-dd6e4795.js +0 -30
  113. package/dist/themeProvider-5800417e.js +0 -19
@@ -0,0 +1,25 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { c } from "./bind-06a7ff84.js";
3
+ const b = "_disabled_1q88n_12", i = {
4
+ "base-icon-button": "_base-icon-button_1q88n_1",
5
+ disabled: b
6
+ }, r = c.bind(i), m = ({
7
+ children: s,
8
+ className: o,
9
+ disabled: t = !1,
10
+ onClick: n,
11
+ ...a
12
+ }) => /* @__PURE__ */ e(
13
+ "button",
14
+ {
15
+ className: r("base-icon-button", o, { disabled: t }),
16
+ type: "button",
17
+ disabled: t,
18
+ onClick: n,
19
+ ...a,
20
+ children: s
21
+ }
22
+ );
23
+ export {
24
+ m as B
25
+ };
@@ -0,0 +1,7 @@
1
+ import { B as t } from "./baseIconButton-b6adc843.js";
2
+ import "react/jsx-runtime";
3
+ import "./bind-06a7ff84.js";
4
+ export {
5
+ t as BaseIconButton,
6
+ t as default
7
+ };
@@ -0,0 +1,41 @@
1
+ function a(s) {
2
+ return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
3
+ }
4
+ var u = { exports: {} };
5
+ /*!
6
+ Copyright (c) 2018 Jed Watson.
7
+ Licensed under the MIT License (MIT), see
8
+ http://jedwatson.github.io/classnames
9
+ */
10
+ (function(s) {
11
+ (function() {
12
+ var c = {}.hasOwnProperty;
13
+ function e() {
14
+ for (var n = [], i = 0; i < arguments.length; i++) {
15
+ var t = arguments[i];
16
+ if (t) {
17
+ var r = typeof t;
18
+ if (r === "string" || r === "number")
19
+ n.push(this && this[t] || t);
20
+ else if (Array.isArray(t))
21
+ n.push(e.apply(this, t));
22
+ else if (r === "object") {
23
+ if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]")) {
24
+ n.push(t.toString());
25
+ continue;
26
+ }
27
+ for (var o in t)
28
+ c.call(t, o) && t[o] && n.push(this && this[o] || o);
29
+ }
30
+ }
31
+ }
32
+ return n.join(" ");
33
+ }
34
+ s.exports ? (e.default = e, s.exports = e) : window.classNames = e;
35
+ })();
36
+ })(u);
37
+ var f = u.exports;
38
+ const l = /* @__PURE__ */ a(f);
39
+ export {
40
+ l as c
41
+ };
@@ -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
+ };
@@ -0,0 +1,7 @@
1
+ import { B as r } from "./bubblesLoader-a7e709d4.js";
2
+ import "react/jsx-runtime";
3
+ import "./bind-06a7ff84.js";
4
+ export {
5
+ r as BubblesLoader,
6
+ r as default
7
+ };
@@ -0,0 +1,62 @@
1
+ import { jsxs as p, jsx as b } from "react/jsx-runtime";
2
+ import { forwardRef as h } from "react";
3
+ import { c as l } from "./bind-06a7ff84.js";
4
+ const u = "_button_5qews_1", x = "_primary_5qews_19", f = "_disabled_5qews_24", g = "_ghost_5qews_39", y = "_danger_5qews_60", N = "_text_5qews_80", B = "_icon_5qews_126", $ = {
5
+ button: u,
6
+ primary: x,
7
+ disabled: f,
8
+ ghost: g,
9
+ danger: y,
10
+ text: N,
11
+ "width-wide-content": "_width-wide-content_5qews_116",
12
+ "width-parent": "_width-parent_5qews_121",
13
+ icon: B,
14
+ "icon-start": "_icon-start_5qews_132",
15
+ "icon-end": "_icon-end_5qews_136"
16
+ }, e = l.bind($), v = h(
17
+ ({
18
+ variant: _ = "primary",
19
+ icon: t,
20
+ iconPlace: s = "start",
21
+ adjustWidthOn: n = "content",
22
+ type: r = "button",
23
+ children: c,
24
+ disabled: o = !1,
25
+ onClick: i,
26
+ title: a,
27
+ className: w,
28
+ ...d
29
+ }, m) => {
30
+ const q = e("button", _, w, {
31
+ disabled: o,
32
+ [`width-${n}`]: n
33
+ });
34
+ return /* @__PURE__ */ p(
35
+ "button",
36
+ {
37
+ ref: m,
38
+ type: r,
39
+ disabled: o,
40
+ className: q,
41
+ onClick: i,
42
+ title: a,
43
+ ...d,
44
+ children: [
45
+ t && /* @__PURE__ */ b(
46
+ "i",
47
+ {
48
+ className: e("icon", {
49
+ [`icon-${s}`]: s
50
+ }),
51
+ children: t
52
+ }
53
+ ),
54
+ c
55
+ ]
56
+ }
57
+ );
58
+ }
59
+ );
60
+ export {
61
+ v as B
62
+ };
package/dist/button.js CHANGED
@@ -1,7 +1,7 @@
1
- import { B as o } from "./button-15f7c4a6.js";
1
+ import { B as o } from "./button-33c88abf.js";
2
2
  import "react/jsx-runtime";
3
3
  import "react";
4
- import "classnames/bind";
4
+ import "./bind-06a7ff84.js";
5
5
  export {
6
6
  o as Button,
7
7
  o as default
@@ -0,0 +1,73 @@
1
+ import { jsxs as x, jsx as s } from "react/jsx-runtime";
2
+ import { c as f } from "./bind-06a7ff84.js";
3
+ import { useRef as y, useId as C } from "react";
4
+ import { K as p } from "./keyCodes-f63c0e11.js";
5
+ const E = "_checkbox_189ko_1", D = "_disabled_189ko_11", K = "_input_189ko_16", N = "_control_189ko_23", I = "_children_189ko_149", R = {
6
+ checkbox: E,
7
+ disabled: D,
8
+ input: K,
9
+ control: N,
10
+ "partially-checked": "_partially-checked_189ko_76",
11
+ children: I
12
+ }, e = f.bind(R), A = ({
13
+ children: t,
14
+ disabled: c = !1,
15
+ onChange: d,
16
+ className: h,
17
+ value: r,
18
+ partiallyChecked: b,
19
+ title: l,
20
+ ...u
21
+ }) => {
22
+ const o = y(null), a = C(), m = (n) => {
23
+ var k, _;
24
+ const { keyCode: i } = n;
25
+ if (i === p.SPACE_KEY_CODE) {
26
+ n.preventDefault(), (k = o.current) == null || k.click();
27
+ return;
28
+ }
29
+ i === p.ENTER_KEY_CODE && (n.preventDefault(), (_ = o.current) == null || _.click());
30
+ };
31
+ return /* @__PURE__ */ x(
32
+ "label",
33
+ {
34
+ id: a,
35
+ className: e("checkbox", h, {
36
+ disabled: c
37
+ }),
38
+ title: l,
39
+ children: [
40
+ /* @__PURE__ */ s(
41
+ "input",
42
+ {
43
+ ref: o,
44
+ tabIndex: 0,
45
+ type: "checkbox",
46
+ onKeyDown: m,
47
+ className: e("input", { "partially-checked": b }),
48
+ disabled: c,
49
+ onChange: d,
50
+ checked: r,
51
+ title: l,
52
+ ...u
53
+ }
54
+ ),
55
+ /* @__PURE__ */ s(
56
+ "span",
57
+ {
58
+ "aria-labelledby": a,
59
+ role: "checkbox",
60
+ "aria-checked": r,
61
+ className: e("control", {
62
+ disabled: c
63
+ })
64
+ }
65
+ ),
66
+ t && /* @__PURE__ */ s("span", { className: e("children", { disabled: c }), children: t })
67
+ ]
68
+ }
69
+ );
70
+ };
71
+ export {
72
+ A as C
73
+ };
package/dist/checkbox.js CHANGED
@@ -1,8 +1,8 @@
1
- import { C as r } from "./checkbox-e6a5c84a.js";
1
+ import { C as r } from "./checkbox-9a6c7ce1.js";
2
2
  import "react/jsx-runtime";
3
- import "classnames/bind";
3
+ import "./bind-06a7ff84.js";
4
4
  import "react";
5
- import "./key-codes-abbe7725.js";
5
+ import "./keyCodes-f63c0e11.js";
6
6
  export {
7
7
  r as Checkbox,
8
8
  r as default
@@ -0,0 +1,24 @@
1
+ export declare enum KeyCodes {
2
+ BACKSPACE_KEY_CODE = 8,
3
+ TAB_KEY_CODE = 9,
4
+ ENTER_KEY_CODE = 13,
5
+ ESCAPE_KEY_CODE = 27,
6
+ SPACE_KEY_CODE = 32,
7
+ ARROW_LEFT_KEY_CODE = 37,
8
+ ARROW_UP_KEY_CODE = 38,
9
+ ARROW_RIGHT_KEY_CODE = 39,
10
+ ARROW_DOWN_KEY_CODE = 40,
11
+ DELETE_KEY_CODE = 46,
12
+ NUMBER_START_KEY_CODE = 48,
13
+ NUMBER_END_KEY_CODE = 57,
14
+ NUM_LOCK_0_KEY_CODE = 96,
15
+ NUM_LOCK_1_KEY_CODE = 97,
16
+ NUM_LOCK_2_KEY_CODE = 98,
17
+ NUM_LOCK_3_KEY_CODE = 99,
18
+ NUM_LOCK_4_KEY_CODE = 100,
19
+ NUM_LOCK_5_KEY_CODE = 101,
20
+ NUM_LOCK_6_KEY_CODE = 102,
21
+ NUM_LOCK_7_KEY_CODE = 103,
22
+ NUM_LOCK_8_KEY_CODE = 104,
23
+ NUM_LOCK_9_KEY_CODE = 105
24
+ }
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ interface BubblesLoaderProps {
3
+ color?: string;
4
+ className?: string;
5
+ }
6
+ export declare const BubblesLoader: FC<BubblesLoaderProps>;
7
+ export {};
@@ -0,0 +1,3 @@
1
+ import { BubblesLoader } from './bubblesLoader';
2
+ export { BubblesLoader };
3
+ export default BubblesLoader;
@@ -1,12 +1,11 @@
1
- import { FC, ReactNode, HTMLAttributes, MouseEventHandler } from 'react';
1
+ import { FC, ReactNode, ComponentPropsWithRef, MouseEventHandler } from 'react';
2
2
  type IconPlace = 'start' | 'end';
3
3
  type ButtonVariant = 'primary' | 'ghost' | 'danger' | 'text';
4
4
  type ButtonWidth = 'content' | 'wide-content' | 'parent';
5
- export interface ButtonProps extends HTMLAttributes<HTMLButtonElement> {
5
+ 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;
@@ -4,8 +4,9 @@ interface CheckboxProps extends HTMLAttributes<HTMLInputElement> {
4
4
  children?: ReactNode;
5
5
  disabled?: boolean;
6
6
  className?: string;
7
- dataAutomationId?: string;
8
7
  onChange?: ChangeEventHandler<HTMLInputElement>;
8
+ partiallyChecked?: boolean;
9
+ title?: string;
9
10
  }
10
11
  export declare const Checkbox: FC<CheckboxProps>;
11
12
  export {};
@@ -0,0 +1,24 @@
1
+ import { FC, ReactNode, ReactElement } from 'react';
2
+ interface DatePickerProps {
3
+ onChange?: (date: Date | any) => void;
4
+ onBlur?: () => void;
5
+ onFocus?: () => void;
6
+ headerNodes?: ReactNode;
7
+ disabled?: boolean;
8
+ shouldCloseOnSelect?: boolean;
9
+ fixedHeight?: boolean;
10
+ startDate?: Date | undefined;
11
+ endDate?: Date | undefined;
12
+ customClassName?: string;
13
+ popperClassName?: string;
14
+ calendarClassName?: string;
15
+ customTimeInput?: ReactElement;
16
+ language?: string;
17
+ yearsOptions?: number[];
18
+ placeholder?: string;
19
+ dateFormat?: string;
20
+ selects?: 'start' | 'end' | 'none';
21
+ value?: Date | null;
22
+ }
23
+ export declare const DatePicker: FC<DatePickerProps>;
24
+ export {};
@@ -0,0 +1,15 @@
1
+ import { FC, ReactNode } from 'react';
2
+ export interface DatePickerHeaderProps {
3
+ changeYear: (year: number) => void;
4
+ changeMonth: (month: number) => void;
5
+ decreaseMonth: () => void;
6
+ increaseMonth: () => void;
7
+ headerNodes: ReactNode;
8
+ date: Date;
9
+ prevMonthButtonDisabled: boolean;
10
+ nextMonthButtonDisabled: boolean;
11
+ customClassName: string;
12
+ yearsOptions: number[];
13
+ locale: string;
14
+ }
15
+ export declare const DatePickerHeader: FC<DatePickerHeaderProps>;
@@ -0,0 +1,3 @@
1
+ import { DatePickerHeader } from './datePickerHeader';
2
+ export { DatePickerHeader };
3
+ export default DatePickerHeader;
@@ -0,0 +1,3 @@
1
+ import { DatePicker } from './datePicker';
2
+ export { DatePicker };
3
+ export default DatePicker;
@@ -0,0 +1,3 @@
1
+ import { Locale } from 'date-fns';
2
+ export declare const registerDatePickerLocale: (language: string, locale: Locale) => void;
3
+ export declare const getYearsFrom: (start: number, amountYearsToGenerate?: number) => number[];
@@ -0,0 +1,7 @@
1
+ import { KeyCodes } from '../../common/constants/keyCodes';
2
+ export declare const OPEN_DROPDOWN_KEY_CODES: KeyCodes[];
3
+ export declare const CLOSE_DROPDOWN_KEY_CODES: KeyCodes[];
4
+ export declare enum EventName {
5
+ ON_KEY_DOWN = "onKeyDown",
6
+ ON_CLICK = "onClick"
7
+ }
@@ -0,0 +1,24 @@
1
+ import { ReactNode, FC } from 'react';
2
+ import { DropdownVariant, RenderDropdownOption, DropdownOptionType, DropdownValue } from './types';
3
+ interface DropdownProps {
4
+ options: DropdownOptionType[];
5
+ value: DropdownValue;
6
+ disabled?: boolean;
7
+ error?: string;
8
+ mobileDisabled?: boolean;
9
+ title?: string;
10
+ touched?: boolean;
11
+ icon?: ReactNode;
12
+ variant?: DropdownVariant;
13
+ placeholder?: string;
14
+ transparentBackground?: boolean;
15
+ className?: string;
16
+ toggleButtonClassName?: string;
17
+ onChange: (value: DropdownValue) => void;
18
+ onFocus?: () => void;
19
+ onBlur?: () => void;
20
+ renderOption?: RenderDropdownOption;
21
+ isListWidthLimited?: boolean;
22
+ }
23
+ export declare const Dropdown: FC<DropdownProps>;
24
+ export {};
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { DropdownOptionProps } from '../types';
3
+ export declare const DropdownOption: FC<DropdownOptionProps>;
@@ -0,0 +1,3 @@
1
+ import { DropdownOption } from './dropdownOption';
2
+ export { DropdownOption };
3
+ export default DropdownOption;
@@ -0,0 +1,3 @@
1
+ import { Dropdown } from './dropdown';
2
+ export { Dropdown };
3
+ export default Dropdown;
@@ -0,0 +1,20 @@
1
+ import { MouseEventHandler, ReactNode } from 'react';
2
+ export type DropdownVariant = 'default' | 'ghost';
3
+ export type DropdownValue = string | boolean | number;
4
+ export type RenderDropdownOption = (props: DropdownOptionProps) => ReactNode;
5
+ export type DropdownOptionType = {
6
+ value: DropdownValue;
7
+ label: string;
8
+ disabled?: boolean;
9
+ hidden?: boolean;
10
+ title?: string;
11
+ groupRef?: string;
12
+ };
13
+ export interface DropdownOptionProps {
14
+ selected?: boolean;
15
+ onChange?: (value: DropdownValue) => void;
16
+ highlightHovered?: boolean;
17
+ render?: RenderDropdownOption;
18
+ onMouseEnter?: MouseEventHandler<HTMLDivElement>;
19
+ option: DropdownOptionType;
20
+ }
@@ -0,0 +1,4 @@
1
+ import { DropdownValue, DropdownOptionType } from './types';
2
+ export declare const calculateDefaultIndex: (options: DropdownOptionType[], selectedValue: DropdownValue) => number;
3
+ export declare const calculateNextIndex: (options: DropdownOptionType[], index?: number) => number;
4
+ export declare const calculatePrevIndex: (options: DropdownOptionType[], index?: number) => number;
@@ -0,0 +1,4 @@
1
+ import { KeyCodes } from '../../common/constants/keyCodes';
2
+ export declare const DEFAULT_WIDTH_CH = 5;
3
+ export declare const MAX_WIDTH_CH = 16;
4
+ export declare const ALLOWED_KEY_CODES: KeyCodes[];
@@ -0,0 +1,18 @@
1
+ import { FC, HTMLAttributes, FocusEventHandler } from 'react';
2
+ type FieldNumberValue = number | string;
3
+ interface FieldNumberProps extends Omit<HTMLAttributes<HTMLInputElement>, 'onChange' | 'onFocus'> {
4
+ onChange: (value: number | string) => void;
5
+ value?: FieldNumberValue;
6
+ placeholder?: string;
7
+ disabled?: boolean;
8
+ label?: string;
9
+ postfix?: string;
10
+ min?: number;
11
+ max?: number;
12
+ title?: string;
13
+ error?: string;
14
+ touched?: boolean;
15
+ onFocus?: () => void | FocusEventHandler<HTMLInputElement>;
16
+ }
17
+ export declare const FieldNumber: FC<FieldNumberProps>;
18
+ export {};
@@ -0,0 +1,3 @@
1
+ import { FieldNumber } from './fieldNumber.js';
2
+ export { FieldNumber };
3
+ export default FieldNumber;
@@ -1,11 +1,13 @@
1
- import { FC, ChangeEventHandler, ReactNode, HTMLAttributes } from 'react';
2
- interface FieldTextProps extends HTMLAttributes<HTMLInputElement> {
1
+ import { ChangeEventHandler, ReactNode, InputHTMLAttributes } from 'react';
2
+ interface FieldTextProps extends InputHTMLAttributes<HTMLInputElement> {
3
3
  value?: string;
4
4
  className?: string;
5
5
  error?: string;
6
6
  placeholder?: string;
7
7
  disabled?: boolean;
8
8
  onChange?: ChangeEventHandler<HTMLInputElement>;
9
+ onFocus?: ChangeEventHandler<HTMLInputElement>;
10
+ onBlur?: ChangeEventHandler<HTMLInputElement>;
9
11
  touched?: boolean;
10
12
  title?: string;
11
13
  label?: string;
@@ -18,6 +20,9 @@ interface FieldTextProps extends HTMLAttributes<HTMLInputElement> {
18
20
  isRequired?: boolean;
19
21
  hasDoubleMessage?: boolean;
20
22
  type?: string;
23
+ displayError?: boolean;
24
+ collapsible?: boolean;
25
+ loading?: boolean;
21
26
  }
22
- export declare const FieldText: FC<FieldTextProps>;
27
+ export declare const FieldText: import("react").ForwardRefExoticComponent<FieldTextProps & import("react").RefAttributes<HTMLInputElement>>;
23
28
  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,15 @@
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';
13
+ export { default as CalendarArrowIcon } from './svg/calendarArrow.svg';
14
+ export { default as CalendarIcon } from './svg/calendar.svg';
15
+ export { default as SearchIcon } from './svg/search.svg';
@@ -4,3 +4,16 @@ export { SystemMessage } from './systemMessage';
4
4
  export { FieldText } from './fieldText';
5
5
  export { ThemeProvider } from './themeProvider';
6
6
  export { Modal } from './modal';
7
+ export { Dropdown } from './dropdown';
8
+ export { Toggle } from './toggle';
9
+ export { FieldNumber } from './fieldNumber';
10
+ export { BubblesLoader } from './bubblesLoader';
11
+ export { SpinLoader } from './spinLoader';
12
+ export { FieldTextFlex } from './fieldTextFlex';
13
+ export { Radio } from './radio';
14
+ export { Tooltip } from './tooltip';
15
+ export { Popover } from './popover';
16
+ export { Pagination } from './pagination';
17
+ export { Table } from './table';
18
+ export { DatePicker } from './datePicker';
19
+ export * from './icons';
@@ -3,17 +3,21 @@ 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
- headerNode?: ReactNode;
8
8
  children?: ReactNode;
9
9
  footerNode?: ReactNode;
10
10
  className?: string;
11
+ zIndex?: number;
11
12
  size?: ModalSize;
12
13
  overlay?: ModalOverlay;
13
14
  allowCloseOutside?: boolean;
14
15
  okButton?: ButtonProps;
15
16
  cancelButton?: ButtonProps;
16
- onClose: () => void;
17
+ scrollable?: boolean;
18
+ withoutFooter?: boolean;
19
+ createFooter?: (closeHandler: () => void) => ReactNode;
20
+ description?: ReactNode;
17
21
  }
18
22
  export declare const Modal: FC<ModalProps>;
19
23
  export {};
@@ -1,5 +1,6 @@
1
1
  import { ReactNode, FC } from 'react';
2
2
  interface ModalContentProps {
3
+ scrollable?: boolean;
3
4
  children?: ReactNode;
4
5
  }
5
6
  export declare const ModalContent: FC<ModalContentProps>;
@@ -1,8 +1,8 @@
1
1
  import { ReactNode, FC } from 'react';
2
2
  interface ModalHeaderProps {
3
3
  title?: ReactNode;
4
- headerNode?: ReactNode;
5
4
  onClose: () => void;
5
+ withDescription?: boolean;
6
6
  }
7
7
  export declare const ModalHeader: FC<ModalHeaderProps>;
8
8
  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';