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

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 (152) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +255 -3
  3. package/dist/arrowUp-4a5caee7.js +6 -0
  4. package/dist/baseIconButton-251479f7.js +25 -0
  5. package/dist/baseIconButton.js +7 -0
  6. package/dist/bubblesLoader-a7e709d4.js +17 -0
  7. package/dist/bubblesLoader.js +1 -1
  8. package/dist/button-33bc880f.js +64 -0
  9. package/dist/button.js +1 -1
  10. package/dist/calendarArrow-3e1339ea.js +6 -0
  11. package/dist/checkbox-aa91985d.js +73 -0
  12. package/dist/checkbox.js +1 -1
  13. package/dist/close-4b33d7c1.js +5 -0
  14. package/dist/common/hooks/useOnClickOutside.d.ts +1 -0
  15. package/dist/common/types.d.ts +3 -0
  16. package/dist/components/baseIconButton/baseIconButton.d.ts +9 -0
  17. package/dist/components/baseIconButton/index.d.ts +5 -0
  18. package/dist/components/bubblesLoader/bubblesLoader.d.ts +1 -0
  19. package/dist/components/bubblesLoader/index.d.ts +1 -0
  20. package/dist/components/button/button.d.ts +4 -4
  21. package/dist/components/button/index.d.ts +3 -2
  22. package/dist/components/checkbox/checkbox.d.ts +3 -0
  23. package/dist/components/checkbox/index.d.ts +1 -0
  24. package/dist/components/datePicker/datePicker.d.ts +25 -0
  25. package/dist/components/datePicker/header/datePickerHeader.d.ts +16 -0
  26. package/dist/components/datePicker/header/index.d.ts +4 -0
  27. package/dist/components/datePicker/index.d.ts +5 -0
  28. package/dist/components/datePicker/utils.d.ts +4 -0
  29. package/dist/components/dropdown/constants.d.ts +5 -0
  30. package/dist/components/dropdown/dropdown.d.ts +13 -5
  31. package/dist/components/dropdown/dropdownOption/dropdownOption.d.ts +1 -0
  32. package/dist/components/dropdown/dropdownOption/index.d.ts +1 -0
  33. package/dist/components/dropdown/index.d.ts +1 -0
  34. package/dist/components/dropdown/types.d.ts +3 -0
  35. package/dist/components/dropdown/utils.d.ts +2 -1
  36. package/dist/components/fieldLabel/fieldLabel.d.ts +7 -0
  37. package/dist/components/fieldLabel/index.d.ts +1 -0
  38. package/dist/components/fieldNumber/constants.d.ts +1 -0
  39. package/dist/components/fieldNumber/fieldNumber.d.ts +3 -2
  40. package/dist/components/fieldNumber/index.d.ts +1 -0
  41. package/dist/components/fieldText/fieldText.d.ts +13 -5
  42. package/dist/components/fieldText/index.d.ts +1 -0
  43. package/dist/components/fieldText/types.d.ts +5 -0
  44. package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +16 -0
  45. package/dist/components/fieldTextFlex/index.d.ts +4 -0
  46. package/dist/components/icons/index.d.ts +48 -0
  47. package/dist/components/index.d.ts +11 -1
  48. package/dist/components/maxValueDisplay/index.d.ts +4 -0
  49. package/dist/components/maxValueDisplay/maxValueDisplay.d.ts +8 -0
  50. package/dist/components/maxValueDisplay/utils/index.d.ts +1 -0
  51. package/dist/components/maxValueDisplay/utils/isPositiveInteger.d.ts +1 -0
  52. package/dist/components/modal/modal.d.ts +7 -2
  53. package/dist/components/modal/modalContent/modalContent.d.ts +2 -0
  54. package/dist/components/modal/modalFooter/modalFooter.d.ts +1 -0
  55. package/dist/components/modal/modalHeader/modalHeader.d.ts +2 -1
  56. package/dist/components/pagination/index.d.ts +5 -0
  57. package/dist/components/pagination/itemsCounter/index.d.ts +1 -0
  58. package/dist/components/pagination/itemsCounter/itemCounter.d.ts +10 -0
  59. package/dist/components/pagination/pageControls/activePage/activePage.d.ts +13 -0
  60. package/dist/components/pagination/pageControls/activePage/index.d.ts +1 -0
  61. package/dist/components/pagination/pageControls/activePage/pageSelector/index.d.ts +1 -0
  62. package/dist/components/pagination/pageControls/activePage/pageSelector/pageSelector.d.ts +11 -0
  63. package/dist/components/pagination/pageControls/index.d.ts +1 -0
  64. package/dist/components/pagination/pageControls/pageControls.d.ts +17 -0
  65. package/dist/components/pagination/pageControls/pageNavigator/bar/bar.d.ts +12 -0
  66. package/dist/components/pagination/pageControls/pageNavigator/bar/index.d.ts +1 -0
  67. package/dist/components/pagination/pageControls/pageNavigator/index.d.ts +1 -0
  68. package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +12 -0
  69. package/dist/components/pagination/pageSizeControl/index.d.ts +1 -0
  70. package/dist/components/pagination/pageSizeControl/pageSizeControl.d.ts +11 -0
  71. package/dist/components/pagination/pageSizeControl/sizeSelector/index.d.ts +1 -0
  72. package/dist/components/pagination/pageSizeControl/sizeSelector/sizeSelector.d.ts +9 -0
  73. package/dist/components/pagination/pagination.d.ts +23 -0
  74. package/dist/components/pagination/types.d.ts +2 -0
  75. package/dist/components/popover/index.d.ts +1 -0
  76. package/dist/components/popover/popover.d.ts +20 -0
  77. package/dist/components/radio/index.d.ts +5 -0
  78. package/dist/components/radio/radio.d.ts +17 -0
  79. package/dist/components/radio/radioGroup.d.ts +9 -0
  80. package/dist/components/spinLoader/index.d.ts +4 -0
  81. package/dist/components/spinLoader/spinLoader.d.ts +8 -0
  82. package/dist/components/systemAlert/index.d.ts +1 -0
  83. package/dist/components/systemAlert/systemAlert.d.ts +4 -0
  84. package/dist/components/systemAlert/types.d.ts +16 -0
  85. package/dist/components/systemMessage/index.d.ts +1 -0
  86. package/dist/components/systemMessage/systemMessage.d.ts +1 -0
  87. package/dist/components/table/constants.d.ts +2 -0
  88. package/dist/components/table/index.d.ts +4 -0
  89. package/dist/components/table/table.d.ts +4 -0
  90. package/dist/components/table/types.d.ts +52 -0
  91. package/dist/components/table/utils.d.ts +6 -0
  92. package/dist/components/themeProvider/index.d.ts +1 -0
  93. package/dist/components/themeProvider/themeProvider.d.ts +3 -1
  94. package/dist/components/toggle/index.d.ts +1 -0
  95. package/dist/components/toggle/toggle.d.ts +1 -0
  96. package/dist/components/tooltip/index.d.ts +1 -0
  97. package/dist/components/tooltip/tooltip.d.ts +23 -0
  98. package/dist/datePicker-382ef010.js +201 -0
  99. package/dist/datePicker.js +28 -0
  100. package/dist/dropdown-0260bb66.js +5 -0
  101. package/dist/dropdown-13d7d50e.js +278 -0
  102. package/dist/dropdown.js +6 -4
  103. package/dist/fieldLabel.js +18 -0
  104. package/dist/fieldNumber-2542b311.js +128 -0
  105. package/dist/fieldNumber.js +4 -3
  106. package/dist/fieldText-e605a521.js +158 -0
  107. package/dist/fieldText.js +6 -2
  108. package/dist/fieldTextFlex-9e616f66.js +78 -0
  109. package/dist/fieldTextFlex.js +10 -0
  110. package/dist/fonts/OpenSans/OpenSans-Bold.ttf +0 -0
  111. package/dist/fonts/OpenSans/OpenSans-Medium.ttf +0 -0
  112. package/dist/icons.js +60 -0
  113. package/dist/index.js +103 -23
  114. package/dist/maxValueDisplay-9be01a75.js +13 -0
  115. package/dist/maxValueDisplay.js +6 -0
  116. package/dist/modal.js +115 -97
  117. package/dist/openEye-7b9cf080.js +7 -0
  118. package/dist/pagination-ecbc9940.js +345 -0
  119. package/dist/pagination.js +20 -0
  120. package/dist/plus-0929dda4.js +6 -0
  121. package/dist/popover.js +99 -0
  122. package/dist/prevPage-87faf576.js +6 -0
  123. package/dist/radio-62546efa.js +76 -0
  124. package/dist/{icon.js → radio.js} +4 -4
  125. package/dist/spinLoader-c4a53718.js +11 -0
  126. package/dist/spinLoader.js +7 -0
  127. package/dist/style.css +1 -1
  128. package/dist/success-dc1914aa.js +7 -0
  129. package/dist/systemAlert.js +63 -0
  130. package/dist/{systemMessage-62c3133d.js → systemMessage-924fdaa6.js} +14 -14
  131. package/dist/systemMessage.js +1 -1
  132. package/dist/table-20aa2cdf.js +142 -0
  133. package/dist/table.js +11 -0
  134. package/dist/themeProvider-46c2be7b.js +23 -0
  135. package/dist/themeProvider.js +4 -3
  136. package/dist/toggle-304107fa.js +59 -0
  137. package/dist/toggle.js +1 -1
  138. package/dist/tooltip.js +101 -0
  139. package/package.json +53 -17
  140. package/dist/bubblesLoader-9bec3797.js +0 -17
  141. package/dist/button-d4944dbc.js +0 -64
  142. package/dist/checkbox-fdc44740.js +0 -68
  143. package/dist/clear-4963efcd.js +0 -5
  144. package/dist/components/icon/icon.d.ts +0 -11
  145. package/dist/components/icon/icons.d.ts +0 -21
  146. package/dist/components/icon/index.d.ts +0 -3
  147. package/dist/dropdown-45e7bc7d.js +0 -204
  148. package/dist/fieldNumber-27e69676.js +0 -132
  149. package/dist/fieldText-c7085849.js +0 -99
  150. package/dist/icon-71262f5c.js +0 -26
  151. package/dist/themeProvider-5800417e.js +0 -19
  152. package/dist/toggle-5b3d8333.js +0 -67
package/dist/index.js CHANGED
@@ -1,34 +1,114 @@
1
- import { B as l } from "./button-d4944dbc.js";
2
- import { C as b } from "./checkbox-fdc44740.js";
3
- import { S as F } from "./systemMessage-62c3133d.js";
4
- import { F as n } from "./fieldText-c7085849.js";
5
- import { T as c } from "./themeProvider-5800417e.js";
6
- import { Modal as C } from "./modal.js";
7
- import { D as I } from "./dropdown-45e7bc7d.js";
8
- import { T as S } from "./toggle-5b3d8333.js";
9
- import { I as v } from "./icon-71262f5c.js";
10
- import { F as y } from "./fieldNumber-27e69676.js";
11
- import { B as N } from "./bubblesLoader-9bec3797.js";
1
+ import { B as u } from "./button-33bc880f.js";
2
+ import { B as D } from "./baseIconButton-251479f7.js";
3
+ import { C as g } from "./checkbox-aa91985d.js";
4
+ import { S as y } from "./systemMessage-924fdaa6.js";
5
+ import { F as b } from "./fieldText-e605a521.js";
6
+ import { T as w } from "./themeProvider-46c2be7b.js";
7
+ import { Modal as v } from "./modal.js";
8
+ import { D as M } from "./dropdown-13d7d50e.js";
9
+ import { T as k } from "./toggle-304107fa.js";
10
+ import { F as R } from "./fieldNumber-2542b311.js";
11
+ import { B as N } from "./bubblesLoader-a7e709d4.js";
12
+ import { S as U } from "./spinLoader-c4a53718.js";
13
+ import { F as J } from "./fieldTextFlex-9e616f66.js";
14
+ import { R as j } from "./radio-62546efa.js";
15
+ import { Tooltip as G } from "./tooltip.js";
16
+ import { Popover as Q } from "./popover.js";
17
+ import { P as X } from "./pagination-ecbc9940.js";
18
+ import { T as Z } from "./table-20aa2cdf.js";
19
+ import { D as $ } from "./datePicker-382ef010.js";
20
+ import "react-datepicker";
21
+ import { SystemAlert as ro } from "./systemAlert.js";
22
+ import { AddCsvIcon as to, AddImageIcon as no, AddJarIcon as ao, BreadcrumbsTreeIcon as co, ChevronDownDropdownIcon as po, ChevronRightBreadcrumbsIcon as io, CopyIcon as mo, DeleteIcon as so, DragAndDropIcon as Io, DragNDropIcon as xo, DurationIcon as fo, EditIcon as lo, ExportIcon as So, ExternalLinkIcon as uo, FilterFilledIcon as Po, FilterOutlineIcon as Do, FlagIcon as Co, HideIcon as go, MaximizeIcon as Fo, MeatballMenuIcon as yo, MoveToFolderIcon as To, PriorityBlockerIcon as bo, PriorityCriticalIcon as Bo, PriorityHighIcon as wo, PriorityLowIcon as ho, PriorityMediumIcon as vo, PriorityUnspecifiedIcon as Ao, RerunIcon as Mo, SearchIcon as Eo, SortIcon as ko, StatusSuccessIcon as Lo, WarningIcon as Ro } from "./icons.js";
23
+ import { S as No, a as Oo } from "./arrowUp-4a5caee7.js";
24
+ import { a as zo, S as Jo } from "./calendarArrow-3e1339ea.js";
25
+ import { S as jo, a as qo, b as Go } from "./openEye-7b9cf080.js";
26
+ import { S as Qo } from "./close-4b33d7c1.js";
27
+ import { S as Xo } from "./dropdown-0260bb66.js";
28
+ import { S as Zo, a as _o, b as $o } from "./success-dc1914aa.js";
29
+ import { S as rr, a as er } from "./plus-0929dda4.js";
30
+ import { S as nr, a as ar } from "./prevPage-87faf576.js";
12
31
  import "react/jsx-runtime";
13
32
  import "react";
14
33
  import "./bind-06a7ff84.js";
15
34
  import "./keyCodes-f63c0e11.js";
16
- import "./clear-4963efcd.js";
35
+ import "./maxValueDisplay-9be01a75.js";
36
+ import "./fieldLabel.js";
17
37
  import "rc-scrollbars";
18
38
  import "framer-motion";
19
39
  import "./useOnClickOutside-c332f7d3.js";
20
- import "react-popper";
40
+ import "@floating-ui/react-dom";
21
41
  import "downshift";
42
+ import "react-dom";
43
+ import "@floating-ui/react";
44
+ import "react-datepicker/dist/es/index.js";
22
45
  export {
46
+ to as AddCsvIcon,
47
+ no as AddImageIcon,
48
+ ao as AddJarIcon,
49
+ No as ArrowDownIcon,
50
+ Oo as ArrowUpIcon,
51
+ D as BaseIconButton,
52
+ co as BreadcrumbsTreeIcon,
23
53
  N as BubblesLoader,
24
- l as Button,
25
- b as Checkbox,
26
- I as Dropdown,
27
- y as FieldNumber,
28
- n as FieldText,
29
- v as Icon,
30
- C as Modal,
31
- F as SystemMessage,
32
- c as ThemeProvider,
33
- S as Toggle
54
+ u as Button,
55
+ zo as CalendarArrowIcon,
56
+ Jo as CalendarIcon,
57
+ g as Checkbox,
58
+ po as ChevronDownDropdownIcon,
59
+ io as ChevronRightBreadcrumbsIcon,
60
+ jo as ClearIcon,
61
+ qo as CloseEyeIcon,
62
+ Qo as CloseIcon,
63
+ mo as CopyIcon,
64
+ $ as DatePicker,
65
+ so as DeleteIcon,
66
+ Io as DragAndDropIcon,
67
+ xo as DragNDropIcon,
68
+ M as Dropdown,
69
+ Xo as DropdownIcon,
70
+ fo as DurationIcon,
71
+ lo as EditIcon,
72
+ Zo as ErrorIcon,
73
+ So as ExportIcon,
74
+ uo as ExternalLinkIcon,
75
+ R as FieldNumber,
76
+ b as FieldText,
77
+ J as FieldTextFlex,
78
+ Po as FilterFilledIcon,
79
+ Do as FilterOutlineIcon,
80
+ Co as FlagIcon,
81
+ go as HideIcon,
82
+ _o as InfoIcon,
83
+ Fo as MaximizeIcon,
84
+ yo as MeatballMenuIcon,
85
+ rr as MinusIcon,
86
+ v as Modal,
87
+ To as MoveToFolderIcon,
88
+ Go as OpenEyeIcon,
89
+ X as Pagination,
90
+ er as PlusIcon,
91
+ Q as Popover,
92
+ nr as PrevChapterIcon,
93
+ ar as PrevPageIcon,
94
+ bo as PriorityBlockerIcon,
95
+ Bo as PriorityCriticalIcon,
96
+ wo as PriorityHighIcon,
97
+ ho as PriorityLowIcon,
98
+ vo as PriorityMediumIcon,
99
+ Ao as PriorityUnspecifiedIcon,
100
+ j as Radio,
101
+ Mo as RerunIcon,
102
+ Eo as SearchIcon,
103
+ ko as SortIcon,
104
+ U as SpinLoader,
105
+ Lo as StatusSuccessIcon,
106
+ $o as SuccessIcon,
107
+ ro as SystemAlert,
108
+ y as SystemMessage,
109
+ Z as Table,
110
+ w as ThemeProvider,
111
+ k as Toggle,
112
+ G as Tooltip,
113
+ Ro as WarningIcon
34
114
  };
@@ -0,0 +1,13 @@
1
+ import { jsxs as r } from "react/jsx-runtime";
2
+ const t = (s) => typeof s == "number" && Number.isFinite(s) && Number.isInteger(s) && s > 0, p = ({
3
+ className: s,
4
+ value: e,
5
+ maxValue: n
6
+ }) => t(n) ? /* @__PURE__ */ r("span", { className: s, children: [
7
+ e,
8
+ "/",
9
+ n
10
+ ] }) : null;
11
+ export {
12
+ p as M
13
+ };
@@ -0,0 +1,6 @@
1
+ import { M as o } from "./maxValueDisplay-9be01a75.js";
2
+ import "react/jsx-runtime";
3
+ export {
4
+ o as MaxValueDisplay,
5
+ o as default
6
+ };
package/dist/modal.js CHANGED
@@ -1,128 +1,146 @@
1
- import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
- import { useState as w, useEffect as f, useRef as R } from "react";
3
- import { Scrollbars as T } from "rc-scrollbars";
4
- import { AnimatePresence as L, motion as W } from "framer-motion";
5
- import { c as m } from "./bind-06a7ff84.js";
6
- import { u as D } from "./useOnClickOutside-c332f7d3.js";
7
- import { K as I } from "./keyCodes-f63c0e11.js";
8
- import { B as b } from "./button-d4944dbc.js";
9
- import { I as j } from "./icon-71262f5c.js";
10
- import "./clear-4963efcd.js";
11
- const K = () => {
12
- const [t, a] = w({ width: 0, height: 0 });
13
- return f(() => {
14
- const o = () => {
15
- a({
1
+ import { jsx as e, jsxs as d, Fragment as F } from "react/jsx-runtime";
2
+ import { useState as u, useEffect as y, useRef as G } from "react";
3
+ import { Scrollbars as K } from "rc-scrollbars";
4
+ import { AnimatePresence as P, motion as B } from "framer-motion";
5
+ import { c as w } from "./bind-06a7ff84.js";
6
+ import { u as Y } from "./useOnClickOutside-c332f7d3.js";
7
+ import { K as U } from "./keyCodes-f63c0e11.js";
8
+ import { B as O } from "./button-33bc880f.js";
9
+ import { B as X } from "./baseIconButton-251479f7.js";
10
+ import { S as J } from "./close-4b33d7c1.js";
11
+ const Q = () => {
12
+ const [o, n] = u({ width: 0, height: 0 });
13
+ return y(() => {
14
+ const a = () => {
15
+ n({
16
16
  width: window.innerWidth,
17
17
  height: window.innerHeight
18
18
  });
19
19
  };
20
- return window.addEventListener("resize", o), o(), () => window.removeEventListener("resize", o);
21
- }, []), t;
22
- }, F = {
23
- "modal-content": "_modal-content_xak18_1"
24
- }, P = m.bind(F), G = ({ children: t }) => /* @__PURE__ */ e("div", { className: P("modal-content"), children: t }), X = {
20
+ return window.addEventListener("resize", a), a(), () => window.removeEventListener("resize", a);
21
+ }, []), o;
22
+ }, V = "_scrollable_zh8d2_12", Z = {
23
+ "modal-content": "_modal-content_zh8d2_1",
24
+ scrollable: V
25
+ }, ee = w.bind(Z), z = ({ scrollable: o = !1, children: n }) => /* @__PURE__ */ e("div", { className: ee("modal-content", { scrollable: o }), children: n }), te = {
25
26
  "buttons-block": "_buttons-block_1dgm4_1",
26
27
  "button-container": "_button-container_1dgm4_5",
27
28
  "modal-footer": "_modal-footer_1dgm4_14",
28
29
  "with-extra-node": "_with-extra-node_1dgm4_21",
29
30
  "size-small": "_size-small_1dgm4_25"
30
- }, c = m.bind(X), Y = ({
31
- footerNode: t,
32
- closeHandler: a,
33
- okButton: o,
34
- cancelButton: s,
35
- size: i
36
- }) => /* @__PURE__ */ l("div", { className: c("modal-footer", { "with-extra-node": t, [`size-${i}`]: i }), children: [
37
- t && t,
38
- /* @__PURE__ */ l("div", { className: c("buttons-block"), children: [
39
- s && /* @__PURE__ */ e("div", { className: c("button-container"), children: /* @__PURE__ */ e(
40
- b,
31
+ }, m = w.bind(te), oe = ({
32
+ footerNode: o,
33
+ closeHandler: n,
34
+ okButton: a,
35
+ cancelButton: r,
36
+ size: l
37
+ }) => /* @__PURE__ */ d("div", { className: m("modal-footer", { "with-extra-node": o, [`size-${l}`]: l }), children: [
38
+ o && o,
39
+ /* @__PURE__ */ d("div", { className: m("buttons-block"), children: [
40
+ r && /* @__PURE__ */ e("div", { className: m("button-container"), children: /* @__PURE__ */ e(
41
+ O,
41
42
  {
42
43
  variant: "ghost",
43
- adjustWidthOn: i === "small" ? "parent" : "content",
44
- onClick: a,
45
- ...s
44
+ adjustWidthOn: l === "small" ? "parent" : "min-width",
45
+ onClick: n,
46
+ ...r
46
47
  }
47
48
  ) }),
48
- o && /* @__PURE__ */ e("div", { className: c("button-container"), children: /* @__PURE__ */ e(b, { adjustWidthOn: i === "small" ? "parent" : "content", ...o }) })
49
+ a && /* @__PURE__ */ e("div", { className: m("button-container"), children: /* @__PURE__ */ e(O, { adjustWidthOn: l === "small" ? "parent" : "min-width", ...a }) })
49
50
  ] })
50
- ] }), q = {
51
- "modal-header": "_modal-header_1d7tr_1",
52
- "modal-header-content": "_modal-header-content_1d7tr_11",
53
- "modal-title": "_modal-title_1d7tr_20",
54
- "close-modal-icon": "_close-modal-icon_1d7tr_28"
55
- }, r = m.bind(q), B = ({ title: t, onClose: a, headerNode: o }) => /* @__PURE__ */ l("div", { className: r("modal-header"), children: [
56
- /* @__PURE__ */ l("div", { className: r("modal-header-content"), children: [
57
- t && /* @__PURE__ */ e("span", { className: r("modal-title"), children: t }),
58
- o && o
59
- ] }),
60
- /* @__PURE__ */ e(j, { icon: "close", className: r("close-modal-icon"), onClick: a })
61
- ] }), J = "_modal_8a5l_1", Q = {
62
- modal: J,
63
- "overlay-default": "_overlay-default_8a5l_11",
64
- "overlay-light-cyan": "_overlay-light-cyan_8a5l_16",
65
- "scrolling-content": "_scrolling-content_8a5l_21",
66
- "modal-window": "_modal-window_8a5l_28",
67
- "size-default": "_size-default_8a5l_45",
68
- "size-small": "_size-small_8a5l_57",
69
- "size-large": "_size-large_8a5l_69"
70
- }, E = m.bind(Q), U = 0.9, V = 176, ce = ({
71
- title: t,
72
- headerNode: a,
73
- children: o,
74
- footerNode: s,
75
- okButton: i,
76
- cancelButton: H,
77
- className: M,
78
- size: _ = "default",
79
- onClose: z = () => {
51
+ ] }), ne = {
52
+ "modal-header": "_modal-header_w4aaf_1",
53
+ "width-description": "_width-description_w4aaf_10",
54
+ "modal-header-content": "_modal-header-content_w4aaf_14",
55
+ "modal-title": "_modal-title_w4aaf_20",
56
+ "close-modal-icon": "_close-modal-icon_w4aaf_29"
57
+ }, _ = w.bind(ne), ae = ({ title: o, onClose: n, withDescription: a = !1 }) => /* @__PURE__ */ d("div", { className: _("modal-header", { "width-description": a }), children: [
58
+ /* @__PURE__ */ e("div", { className: _("modal-header-content"), children: o && /* @__PURE__ */ e("div", { className: _("modal-title"), children: o }) }),
59
+ /* @__PURE__ */ e(X, { className: _("close-modal-icon"), onClick: n, children: /* @__PURE__ */ e(J, {}) })
60
+ ] }), le = "_modal_yxql5_1", se = "_description_yxql5_43", ie = "_scrollable_yxql5_53", de = {
61
+ modal: le,
62
+ "overlay-default": "_overlay-default_yxql5_12",
63
+ "overlay-light-cyan": "_overlay-light-cyan_yxql5_16",
64
+ "scrolling-content": "_scrolling-content_yxql5_20",
65
+ "modal-window": "_modal-window_yxql5_26",
66
+ description: se,
67
+ scrollable: ie,
68
+ "size-default": "_size-default_yxql5_57",
69
+ "size-small": "_size-small_yxql5_69",
70
+ "size-large": "_size-large_yxql5_81"
71
+ }, h = w.bind(de), ce = 0.9, re = 32 + 24, me = 32 + 8, _e = 36 + 16, he = 32 * 2, Ee = ({
72
+ title: o,
73
+ children: n,
74
+ footerNode: a,
75
+ okButton: r,
76
+ cancelButton: l,
77
+ className: A,
78
+ size: f = "default",
79
+ onClose: C = () => {
80
80
  },
81
- overlay: g = "default",
82
- allowCloseOutside: N = !0
81
+ overlay: x = "default",
82
+ zIndex: D = 2,
83
+ allowCloseOutside: S = !0,
84
+ scrollable: p = !1,
85
+ withoutFooter: v = !1,
86
+ createFooter: b = null,
87
+ description: s = null
83
88
  }) => {
84
- const [k, p] = w(!1), [C, O] = w(0), n = R(null), v = K(), y = v.height, $ = y * U, h = (y - C) / 2, A = $ - V, d = () => {
85
- p(!1);
86
- }, x = (u) => {
87
- const { keyCode: S } = u;
88
- S === I.ESCAPE_KEY_CODE && d();
89
+ const [T, H] = u(!1), [I, q] = u(0), [L, $] = u(!1), i = G(null), E = Q(), M = E.height, k = M * ce, g = (M - I) / 2, R = () => {
90
+ let t = k - he;
91
+ return v || (t = t - _e), s ? t = t - me : t = t - re, t;
92
+ }, c = () => {
93
+ H(!1);
94
+ }, N = (t) => {
95
+ const { keyCode: j } = t;
96
+ j === U.ESCAPE_KEY_CODE && c();
97
+ }, W = () => {
98
+ var t;
99
+ L || ((t = i.current) == null || t.focus(), $(!0));
89
100
  };
90
- return f(() => {
91
- if (n && n.current) {
92
- const { clientHeight: u } = n.current;
93
- O(u);
101
+ return y(() => {
102
+ if (i && i.current) {
103
+ const { clientHeight: t } = i.current;
104
+ q(t);
94
105
  }
95
- }, [o, v]), f(() => (p(!0), n && n.current && n.current.focus(), document.addEventListener("keydown", x, !1), () => document.removeEventListener("keydown", x, !1)), []), D(n, N ? d : void 0), /* @__PURE__ */ e(L, { onExitComplete: z, children: k && /* @__PURE__ */ e("div", { className: E("modal", { [`overlay-${g}`]: g }), children: /* @__PURE__ */ l(
96
- W.div,
106
+ }, [n, E]), y(() => (H(!0), document.addEventListener("keydown", N, !1), () => document.removeEventListener("keydown", N, !1)), []), Y(i, S ? c : void 0), /* @__PURE__ */ e(P, { onExitComplete: C, children: T && /* @__PURE__ */ e("div", { className: h("modal", { [`overlay-${x}`]: x }), style: { zIndex: D }, children: /* @__PURE__ */ d(
107
+ B.div,
97
108
  {
98
- className: E("modal-window", { [`size-${_}`]: _ }, M),
99
- ref: n,
109
+ className: h("modal-window", { [`size-${f}`]: f }, A),
110
+ ref: i,
100
111
  tabIndex: 0,
101
- initial: { opacity: 0, marginTop: -h },
102
- animate: { opacity: 1, marginTop: h },
103
- exit: { opacity: 0, marginTop: -h },
112
+ initial: { opacity: 0, marginTop: -g },
113
+ animate: { opacity: 1, marginTop: g },
114
+ exit: { opacity: 0, marginTop: -g },
104
115
  transition: { duration: 0.3 },
116
+ onAnimationStart: W,
105
117
  children: [
106
- /* @__PURE__ */ e(B, { title: t, headerNode: a, onClose: d }),
107
- /* @__PURE__ */ e(T, { autoHeight: !0, autoHeightMax: A, hideTracksWhenNotNeeded: !0, children: /* @__PURE__ */ e(G, { children: o }) }),
108
- /* @__PURE__ */ e(
109
- Y,
118
+ /* @__PURE__ */ e(ae, { title: o, onClose: c, withDescription: !!s }),
119
+ p ? /* @__PURE__ */ d(K, { autoHeight: !0, autoHeightMax: R(), hideTracksWhenNotNeeded: !0, children: [
120
+ s && /* @__PURE__ */ e("span", { className: h("description", { scrollable: p }), children: s }),
121
+ /* @__PURE__ */ e(z, { scrollable: !0, children: n })
122
+ ] }) : /* @__PURE__ */ d(F, { children: [
123
+ s && /* @__PURE__ */ e("span", { className: h("description"), children: s }),
124
+ /* @__PURE__ */ e(z, { children: n })
125
+ ] }),
126
+ !v && (b ? b(c) : /* @__PURE__ */ e(
127
+ oe,
110
128
  {
111
- size: _,
112
- footerNode: s,
113
- okButton: i,
114
- cancelButton: H,
115
- closeHandler: d
129
+ size: f,
130
+ footerNode: a,
131
+ okButton: r,
132
+ cancelButton: l,
133
+ closeHandler: c
116
134
  }
117
- )
135
+ ))
118
136
  ]
119
137
  },
120
138
  "modal-window"
121
139
  ) }) });
122
140
  };
123
141
  export {
124
- ce as Modal,
125
- G as ModalContent,
126
- Y as ModalFooter,
127
- B as ModalHeader
142
+ Ee as Modal,
143
+ z as ModalContent,
144
+ oe as ModalFooter,
145
+ ae as ModalHeader
128
146
  };
@@ -0,0 +1,7 @@
1
+ import * as e from "react";
2
+ const l = (C) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...C }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1 8C1 4.14001 4.14001 1 8 1C11.86 1 15 4.14001 15 8C15 11.8595 11.86 15 8 15C4.14001 15 1 11.8595 1 8ZM5 5.54545L5.54545 5L8 7.45455L10.4545 5L11 5.54545L8.54545 8L11 10.4545L10.4545 11L8 8.54545L5.54545 11L5 10.4545L7.45455 8L5 5.54545Z", fill: "#A2AAB5" })), t = (C) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...C }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.09194 3.90153C8.73249 3.84853 8.36745 3.82135 7.99778 3.82135C5.24735 3.82135 2.75312 5.32613 0.912626 7.77031C0.762442 7.97055 0.762442 8.25031 0.912626 8.45055C1.96494 9.84971 3.23098 10.9408 4.63642 11.6187L5.59679 9.95532C5.16732 9.39694 4.92809 8.68447 4.97644 7.91459C5.07067 6.40686 6.29276 5.18478 7.80049 5.09055C8.00285 5.07782 8.2013 5.08498 8.39407 5.11028L9.09194 3.90153ZM7.56961 6.5383C6.91222 6.71981 6.41543 7.30478 6.37225 8.00589C6.36032 8.18701 6.37814 8.36223 6.42131 8.5272L7.56961 6.5383ZM8.40613 9.68939L9.57119 7.67146C9.61868 7.84288 9.6387 8.02571 9.62624 8.21497C9.58001 8.92637 9.07238 9.51681 8.40613 9.68939ZM7.58518 11.1113C7.78307 11.1384 7.98701 11.1463 8.19509 11.1332C9.69987 11.0361 10.922 9.81398 11.0191 8.3092C11.0679 7.53332 10.8245 6.81576 10.3887 6.25546L11.3454 4.59845C12.7563 5.27587 14.0272 6.36953 15.0829 7.77325C15.2331 7.9735 15.2331 8.25325 15.0829 8.4535C13.2424 10.8977 10.7482 12.4025 7.99778 12.4025C7.62256 12.4025 7.25211 12.3744 6.88743 12.3199L7.58518 11.1113Z", fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("path", { d: "M10.5051 2.25952C10.7122 1.9008 11.1709 1.7779 11.5296 1.985C11.8883 2.19211 12.0112 2.6508 11.8041 3.00952L5.35413 14.1812C5.14702 14.54 4.68833 14.6629 4.32961 14.4558C3.97089 14.2487 3.84798 13.79 4.05509 13.4312L10.5051 2.25952Z", fill: "#A2AAB5" })), n = (C) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...C }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.99778 3.82135C5.24735 3.82135 2.75312 5.32613 0.912626 7.77031C0.762442 7.97055 0.762442 8.25031 0.912626 8.45055C2.75312 10.8977 5.24735 12.4025 7.99778 12.4025C10.7482 12.4025 13.2424 10.8977 15.0829 8.4535C15.2331 8.25325 15.2331 7.9735 15.0829 7.77325C13.2424 5.32614 10.7482 3.82135 7.99778 3.82135ZM8.19509 11.1332C6.36932 11.2481 4.86159 9.74331 4.97644 7.91459C5.07067 6.40686 6.29276 5.18478 7.80049 5.09055C9.62625 4.9757 11.134 6.48048 11.0191 8.3092C10.922 9.81398 9.69987 11.0361 8.19509 11.1332ZM6.37225 8.00589C6.30746 8.98945 7.12022 9.79926 8.10378 9.73742C8.9136 9.68736 9.57323 9.03068 9.62624 8.21497C9.69102 7.23141 8.87826 6.4216 7.8947 6.48344C7.08194 6.53644 6.42231 7.19313 6.37225 8.00589Z", fill: "#A2AAB5" }));
3
+ export {
4
+ l as S,
5
+ t as a,
6
+ n as b
7
+ };