@reportportal/ui-kit 0.0.1-alpha.127 → 0.0.1-alpha.129

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/index.js CHANGED
@@ -1,158 +1,157 @@
1
- import { A as C } from "./index-1a874a8b.js";
2
- import { B as g } from "./baseIconButton-251479f7.js";
3
- import { B as y } from "./breadcrumbs-8e5ca8d7.js";
4
- import { B as T } from "./bubblesLoader-f3ffa240.js";
5
- import { B as h } from "./button-97d9e587.js";
6
- import { C as v } from "./checkbox-ed6cc375.js";
7
- import { D as w } from "./datePicker-322bcafa.js";
1
+ import { A as P } from "./index-1a874a8b.js";
2
+ import { B as F } from "./baseIconButton-251479f7.js";
3
+ import { B as D } from "./breadcrumbs-8e5ca8d7.js";
4
+ import { B } from "./bubblesLoader-f3ffa240.js";
5
+ import { B as b } from "./button-97d9e587.js";
6
+ import { C as A } from "./checkbox-ed6cc375.js";
7
+ import { D as M } from "./datePicker-12bb6fb4.js";
8
8
  import "react-datepicker";
9
- import { D as E } from "./dropdown-18c58189.js";
10
- import { FieldLabel as R } from "./fieldLabel.js";
11
- import { F as U } from "./fieldNumber-d1b5a7a1.js";
12
- import { F as J } from "./fieldText-17fcba4f.js";
13
- import { F as z } from "./fieldTextFlex-2f51c173.js";
14
- import { FileDropArea as W } from "./fileDropArea.js";
15
- import { FiltersButton as j } from "./filtersButton.js";
16
- import { Modal as K } from "./modal.js";
17
- import { MultipleAutocomplete as V, SingleAutocomplete as Y } from "./autocompletes.js";
18
- import { P as _ } from "./pagination-e77d76d8.js";
19
- import { Popover as oo } from "./popover.js";
20
- import { R as eo } from "./radio-62546efa.js";
21
- import { S as to } from "./selection-9124d029.js";
22
- import { S as co } from "./spinLoader-c4a53718.js";
23
- import { SystemAlert as io } from "./systemAlert.js";
24
- import { S as so } from "./systemMessage-924fdaa6.js";
25
- import { T as lo } from "./table-8e223d5d.js";
26
- import { T as fo } from "./themeProvider-46c2be7b.js";
27
- import { T as So } from "./toggle-304107fa.js";
28
- import { Tooltip as Co } from "./tooltip.js";
29
- import { SidePanel as go } from "./sidePanel.js";
30
- import { AddCsvIcon as yo, AddImageIcon as Bo, AddJarIcon as To, BreadcrumbsTreeIcon as bo, CalendarIcon as ho, CheckmarkIcon as Ao, ChevronRightBreadcrumbsIcon as vo, ConfigurationIcon as Mo, CopyIcon as wo, CoverageFullIcon as ko, CoveragePartialIcon as Eo, CoveredManuallyIcon as Lo, DeleteIcon as Ro, DragAndDropIcon as Oo, DragNDropIcon as Uo, DurationIcon as Ho, EditIcon as Jo, ExportIcon as No, FlagIcon as zo, GroupByIcon as Go, HideIcon as Wo, LaunchTypeIcon as Xo, MaximizeIcon as jo, MoveToFolderIcon as qo, PinFilledIcon as Ko, PinOutlineIcon as Qo, PriorityBlockerIcon as Vo, PriorityCriticalIcon as Yo, PriorityHighIcon as Zo, PriorityLowIcon as _o, PriorityMediumIcon as $o, PriorityUnspecifiedIcon as or, RefreshIcon as rr, RerunIcon as er, RunManualIcon as nr, SearchIcon as tr, SortIcon as ar, StatusSuccessIcon as cr, TestPlanIcon as pr, UserIcon as ir, WarningIcon as mr } from "./icons.js";
31
- import { S as Ir, a as lr, b as xr } from "./chevronDownDropdown-66f5b1af.js";
32
- import { S as dr } from "./calendarArrow-44c7e60e.js";
33
- import { S as Sr } from "./clear-53660571.js";
34
- import { S as Cr, a as Fr } from "./openEye-950159cb.js";
35
- import { S as Dr } from "./close-4d480ef7.js";
36
- import { S as Br, a as Tr, b as br, c as hr, d as Ar, e as vr, f as Mr } from "./xls-995781cc.js";
37
- import { S as kr } from "./dropdown-0260bb66.js";
38
- import { S as Lr, a as Rr, b as Or } from "./success-8fd8bd2c.js";
39
- import { S as Hr, a as Jr } from "./filterOutline-819b4b0d.js";
40
- import { S as zr, a as Gr } from "./tree-c3dd3d45.js";
41
- import { S as Xr } from "./minus-2857540f.js";
42
- import { S as qr } from "./plus-199fb2a8.js";
43
- import { S as Qr, a as Vr } from "./prevPage-87faf576.js";
9
+ import { D as k } from "./dropdown-a99520ba.js";
10
+ import { FieldLabel as L } from "./fieldLabel.js";
11
+ import { F as O } from "./fieldNumber-d1b5a7a1.js";
12
+ import { F as H } from "./fieldText-17fcba4f.js";
13
+ import { F as N } from "./fieldTextFlex-2f51c173.js";
14
+ import { FileDropArea as G } from "./fileDropArea.js";
15
+ import { FiltersButton as X } from "./filtersButton.js";
16
+ import { Modal as q } from "./modal.js";
17
+ import { MultipleAutocomplete as Q, SingleAutocomplete as V } from "./autocompletes.js";
18
+ import { P as Z } from "./pagination-e77d76d8.js";
19
+ import { Popover as $ } from "./popover.js";
20
+ import { R as ro } from "./radio-62546efa.js";
21
+ import { S as no } from "./selection-9124d029.js";
22
+ import { S as ao } from "./spinLoader-c4a53718.js";
23
+ import { SystemAlert as po } from "./systemAlert.js";
24
+ import { S as mo } from "./systemMessage-924fdaa6.js";
25
+ import { T as Io } from "./table-8e223d5d.js";
26
+ import { T as xo } from "./themeProvider-46c2be7b.js";
27
+ import { T as uo } from "./toggle-304107fa.js";
28
+ import { Tooltip as Po } from "./tooltip.js";
29
+ import { SidePanel as Fo } from "./sidePanel.js";
30
+ import { AddCsvIcon as Do, AddImageIcon as yo, AddJarIcon as Bo, BreadcrumbsTreeIcon as To, CalendarIcon as bo, CheckmarkIcon as ho, ChevronRightBreadcrumbsIcon as Ao, ConfigurationIcon as vo, CopyIcon as Mo, CoverageFullIcon as wo, CoveragePartialIcon as ko, CoveredManuallyIcon as Eo, DeleteIcon as Lo, DragAndDropIcon as Ro, DragNDropIcon as Oo, DurationIcon as Uo, EditIcon as Ho, ExportIcon as Jo, FlagIcon as No, GroupByIcon as zo, HideIcon as Go, LaunchTypeIcon as Wo, MaximizeIcon as Xo, MoveToFolderIcon as jo, PinFilledIcon as qo, PinOutlineIcon as Ko, PriorityBlockerIcon as Qo, PriorityCriticalIcon as Vo, PriorityHighIcon as Yo, PriorityLowIcon as Zo, PriorityMediumIcon as _o, PriorityUnspecifiedIcon as $o, RefreshIcon as or, RerunIcon as rr, RunManualIcon as er, SearchIcon as nr, SortIcon as tr, StatusSuccessIcon as ar, TestPlanIcon as cr, UserIcon as pr, WarningIcon as ir } from "./icons.js";
31
+ import { S as sr, a as Ir, b as lr } from "./chevronDownDropdown-66f5b1af.js";
32
+ import { S as fr } from "./calendarArrow-44c7e60e.js";
33
+ import { S as ur } from "./clear-53660571.js";
34
+ import { S as Pr, a as Cr } from "./openEye-950159cb.js";
35
+ import { S as gr } from "./close-4d480ef7.js";
36
+ import { S as yr, a as Br, b as Tr, c as br, d as hr, e as Ar, f as vr } from "./xls-995781cc.js";
37
+ import { S as wr } from "./dropdown-0260bb66.js";
38
+ import { S as Er, a as Lr, b as Rr } from "./success-8fd8bd2c.js";
39
+ import { S as Ur, a as Hr } from "./filterOutline-819b4b0d.js";
40
+ import { S as Nr, a as zr } from "./tree-c3dd3d45.js";
41
+ import { S as Wr } from "./minus-2857540f.js";
42
+ import { S as jr } from "./plus-199fb2a8.js";
43
+ import { S as Kr, a as Qr } from "./prevPage-87faf576.js";
44
44
  import "react/jsx-runtime";
45
45
  import "react";
46
46
  import "./bind-06a7ff84.js";
47
47
  import "./keyCodes-f63c0e11.js";
48
48
  import "react-datepicker/dist/es/index.js";
49
+ import "react-dom";
49
50
  import "@floating-ui/react-dom";
50
51
  import "downshift";
51
52
  import "rc-scrollbars";
52
- import "./useOnClickOutside-c332f7d3.js";
53
53
  import "./maxValueDisplay-9be01a75.js";
54
54
  import "./isEmpty-ccacb5ff.js";
55
55
  import "react-dropzone";
56
56
  import "framer-motion";
57
57
  import "@floating-ui/react";
58
58
  import "./floatingUi-41f8c7b5.js";
59
- import "react-dom";
60
59
  export {
61
- yo as AddCsvIcon,
62
- Bo as AddImageIcon,
63
- To as AddJarIcon,
64
- Ir as ArrowDownIcon,
65
- lr as ArrowUpIcon,
66
- C as AttachedFile,
67
- g as BaseIconButton,
68
- y as Breadcrumbs,
69
- bo as BreadcrumbsTreeIcon,
70
- T as BubblesLoader,
71
- h as Button,
72
- dr as CalendarArrowIcon,
73
- ho as CalendarIcon,
74
- v as Checkbox,
75
- Ao as CheckmarkIcon,
76
- xr as ChevronDownDropdownIcon,
77
- vo as ChevronRightBreadcrumbsIcon,
78
- Sr as ClearIcon,
79
- Cr as CloseEyeIcon,
80
- Dr as CloseIcon,
81
- Mo as ConfigurationIcon,
82
- wo as CopyIcon,
83
- ko as CoverageFullIcon,
84
- Eo as CoveragePartialIcon,
85
- Lo as CoveredManuallyIcon,
86
- Br as CsvIcon,
87
- w as DatePicker,
88
- Ro as DeleteIcon,
89
- Oo as DragAndDropIcon,
90
- Uo as DragNDropIcon,
91
- E as Dropdown,
92
- kr as DropdownIcon,
93
- Ho as DurationIcon,
94
- Jo as EditIcon,
95
- Lr as ErrorIcon,
96
- No as ExportIcon,
97
- Tr as ExternalLinkIcon,
98
- R as FieldLabel,
99
- U as FieldNumber,
100
- J as FieldText,
101
- z as FieldTextFlex,
102
- W as FileDropArea,
103
- br as FileOtherIcon,
104
- Hr as FilterFilledIcon,
105
- Jr as FilterOutlineIcon,
106
- j as FiltersButton,
107
- zo as FlagIcon,
108
- Go as GroupByIcon,
109
- Wo as HideIcon,
110
- hr as ImageIcon,
111
- Rr as InfoIcon,
112
- Ar as JarIcon,
113
- Xo as LaunchTypeIcon,
114
- jo as MaximizeIcon,
115
- zr as MeatballMenuIcon,
116
- Xr as MinusIcon,
117
- K as Modal,
118
- qo as MoveToFolderIcon,
119
- V as MultipleAutocomplete,
120
- Fr as OpenEyeIcon,
121
- _ as Pagination,
122
- vr as PdfIcon,
123
- Ko as PinFilledIcon,
124
- Qo as PinOutlineIcon,
125
- qr as PlusIcon,
126
- oo as Popover,
127
- Qr as PrevChapterIcon,
128
- Vr as PrevPageIcon,
129
- Vo as PriorityBlockerIcon,
130
- Yo as PriorityCriticalIcon,
131
- Zo as PriorityHighIcon,
132
- _o as PriorityLowIcon,
133
- $o as PriorityMediumIcon,
134
- or as PriorityUnspecifiedIcon,
135
- eo as Radio,
136
- rr as RefreshIcon,
137
- er as RerunIcon,
138
- nr as RunManualIcon,
139
- tr as SearchIcon,
140
- to as Selection,
141
- go as SidePanel,
142
- Y as SingleAutocomplete,
143
- ar as SortIcon,
144
- co as SpinLoader,
145
- cr as StatusSuccessIcon,
146
- Or as SuccessIcon,
147
- io as SystemAlert,
148
- so as SystemMessage,
149
- lo as Table,
150
- pr as TestPlanIcon,
151
- fo as ThemeProvider,
152
- So as Toggle,
153
- Co as Tooltip,
154
- Gr as TreeIcon,
155
- ir as UserIcon,
156
- mr as WarningIcon,
157
- Mr as XlsIcon
60
+ Do as AddCsvIcon,
61
+ yo as AddImageIcon,
62
+ Bo as AddJarIcon,
63
+ sr as ArrowDownIcon,
64
+ Ir as ArrowUpIcon,
65
+ P as AttachedFile,
66
+ F as BaseIconButton,
67
+ D as Breadcrumbs,
68
+ To as BreadcrumbsTreeIcon,
69
+ B as BubblesLoader,
70
+ b as Button,
71
+ fr as CalendarArrowIcon,
72
+ bo as CalendarIcon,
73
+ A as Checkbox,
74
+ ho as CheckmarkIcon,
75
+ lr as ChevronDownDropdownIcon,
76
+ Ao as ChevronRightBreadcrumbsIcon,
77
+ ur as ClearIcon,
78
+ Pr as CloseEyeIcon,
79
+ gr as CloseIcon,
80
+ vo as ConfigurationIcon,
81
+ Mo as CopyIcon,
82
+ wo as CoverageFullIcon,
83
+ ko as CoveragePartialIcon,
84
+ Eo as CoveredManuallyIcon,
85
+ yr as CsvIcon,
86
+ M as DatePicker,
87
+ Lo as DeleteIcon,
88
+ Ro as DragAndDropIcon,
89
+ Oo as DragNDropIcon,
90
+ k as Dropdown,
91
+ wr as DropdownIcon,
92
+ Uo as DurationIcon,
93
+ Ho as EditIcon,
94
+ Er as ErrorIcon,
95
+ Jo as ExportIcon,
96
+ Br as ExternalLinkIcon,
97
+ L as FieldLabel,
98
+ O as FieldNumber,
99
+ H as FieldText,
100
+ N as FieldTextFlex,
101
+ G as FileDropArea,
102
+ Tr as FileOtherIcon,
103
+ Ur as FilterFilledIcon,
104
+ Hr as FilterOutlineIcon,
105
+ X as FiltersButton,
106
+ No as FlagIcon,
107
+ zo as GroupByIcon,
108
+ Go as HideIcon,
109
+ br as ImageIcon,
110
+ Lr as InfoIcon,
111
+ hr as JarIcon,
112
+ Wo as LaunchTypeIcon,
113
+ Xo as MaximizeIcon,
114
+ Nr as MeatballMenuIcon,
115
+ Wr as MinusIcon,
116
+ q as Modal,
117
+ jo as MoveToFolderIcon,
118
+ Q as MultipleAutocomplete,
119
+ Cr as OpenEyeIcon,
120
+ Z as Pagination,
121
+ Ar as PdfIcon,
122
+ qo as PinFilledIcon,
123
+ Ko as PinOutlineIcon,
124
+ jr as PlusIcon,
125
+ $ as Popover,
126
+ Kr as PrevChapterIcon,
127
+ Qr as PrevPageIcon,
128
+ Qo as PriorityBlockerIcon,
129
+ Vo as PriorityCriticalIcon,
130
+ Yo as PriorityHighIcon,
131
+ Zo as PriorityLowIcon,
132
+ _o as PriorityMediumIcon,
133
+ $o as PriorityUnspecifiedIcon,
134
+ ro as Radio,
135
+ or as RefreshIcon,
136
+ rr as RerunIcon,
137
+ er as RunManualIcon,
138
+ nr as SearchIcon,
139
+ no as Selection,
140
+ Fo as SidePanel,
141
+ V as SingleAutocomplete,
142
+ tr as SortIcon,
143
+ ao as SpinLoader,
144
+ ar as StatusSuccessIcon,
145
+ Rr as SuccessIcon,
146
+ po as SystemAlert,
147
+ mo as SystemMessage,
148
+ Io as Table,
149
+ cr as TestPlanIcon,
150
+ xo as ThemeProvider,
151
+ uo as Toggle,
152
+ Po as Tooltip,
153
+ zr as TreeIcon,
154
+ pr as UserIcon,
155
+ ir as WarningIcon,
156
+ vr as XlsIcon
158
157
  };
package/dist/modal.js CHANGED
@@ -1,146 +1,180 @@
1
- import { jsx as e, jsxs as d, Fragment as P } from "react/jsx-runtime";
2
- import { useState as p, useEffect as b, useRef as j } from "react";
3
- import { Scrollbars as F } from "rc-scrollbars";
4
- import { AnimatePresence as G, motion as K } from "framer-motion";
5
- import { c as y } 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 A } from "./button-97d9e587.js";
9
- import { Tooltip as X } from "./tooltip.js";
10
- import { B as J } from "./baseIconButton-251479f7.js";
11
- import { S as Q } from "./close-4d480ef7.js";
1
+ import { jsx as t, jsxs as u, Fragment as F } from "react/jsx-runtime";
2
+ import { useRef as C, useEffect as w, useState as y, useMemo as G } from "react";
3
+ import { Scrollbars as K } from "rc-scrollbars";
4
+ import { AnimatePresence as U, motion as Y } from "framer-motion";
5
+ import { c as x } from "./bind-06a7ff84.js";
6
+ import { a as X } from "./dropdown-a99520ba.js";
7
+ import { K as J } from "./keyCodes-f63c0e11.js";
8
+ import { B as D } from "./button-97d9e587.js";
9
+ import { Tooltip as Q } from "./tooltip.js";
10
+ import { B as V } from "./baseIconButton-251479f7.js";
11
+ import { S as Z } from "./close-4d480ef7.js";
12
12
  import "react-dom";
13
+ import "@floating-ui/react-dom";
14
+ import "downshift";
15
+ import "./clear-53660571.js";
16
+ import "./dropdown-0260bb66.js";
17
+ import "./fieldLabel.js";
18
+ import "./checkbox-ed6cc375.js";
13
19
  import "@floating-ui/react";
14
20
  import "./floatingUi-41f8c7b5.js";
15
- const V = () => {
16
- const [o, n] = p({ width: 0, height: 0 });
17
- return b(() => {
18
- const l = () => {
19
- n({
21
+ function tt(e, o, n) {
22
+ const c = C(n);
23
+ w(() => {
24
+ c.current = n;
25
+ }, [n]), w(() => {
26
+ if (!o)
27
+ return;
28
+ const s = (a) => {
29
+ var r, d;
30
+ if (e && e.current && !e.current.contains(a.target)) {
31
+ const l = a.target;
32
+ ((d = (r = c.current) == null ? void 0 : r.ignoreSelectors) == null ? void 0 : d.some(
33
+ (v) => l == null ? void 0 : l.closest(v)
34
+ )) || o(a);
35
+ }
36
+ };
37
+ return document.addEventListener("pointerdown", s), () => {
38
+ document.removeEventListener("pointerdown", s);
39
+ };
40
+ }, [e, o]);
41
+ }
42
+ const et = () => {
43
+ const [e, o] = y({ width: 0, height: 0 });
44
+ return w(() => {
45
+ const n = () => {
46
+ o({
20
47
  width: window.innerWidth,
21
48
  height: window.innerHeight
22
49
  });
23
50
  };
24
- return window.addEventListener("resize", l), l(), () => window.removeEventListener("resize", l);
25
- }, []), o;
26
- }, Z = "_scrollable_zh8d2_12", ee = {
51
+ return window.addEventListener("resize", n), n(), () => window.removeEventListener("resize", n);
52
+ }, []), e;
53
+ }, ot = "_scrollable_zh8d2_12", nt = {
27
54
  "modal-content": "_modal-content_zh8d2_1",
28
- scrollable: Z
29
- }, te = y.bind(ee), C = ({ scrollable: o = !1, children: n }) => /* @__PURE__ */ e("div", { className: te("modal-content", { scrollable: o }), children: n }), oe = {
55
+ scrollable: ot
56
+ }, it = x.bind(nt), S = ({ scrollable: e = !1, children: o }) => /* @__PURE__ */ t("div", { className: it("modal-content", { scrollable: e }), children: o }), st = {
30
57
  "buttons-block": "_buttons-block_1mwne_1",
31
58
  "button-container": "_button-container_1mwne_7",
32
59
  "modal-footer": "_modal-footer_1mwne_12",
33
60
  "with-extra-node": "_with-extra-node_1mwne_19",
34
61
  "size-small": "_size-small_1mwne_23"
35
- }, u = y.bind(oe), ne = ({
36
- footerNode: o,
37
- closeHandler: n,
38
- okButton: l,
39
- cancelButton: _,
40
- size: a
62
+ }, f = x.bind(st), lt = ({
63
+ footerNode: e,
64
+ closeHandler: o,
65
+ okButton: n,
66
+ cancelButton: c,
67
+ size: s
41
68
  }) => {
42
- const { tooltipNode: h, ...c } = l || {}, g = () => {
43
- const r = /* @__PURE__ */ e(A, { adjustWidthOn: a === "small" ? "parent" : "min-width", ...c });
44
- return h ? /* @__PURE__ */ e(X, { content: h, placement: "top", width: 270, children: r }) : r;
69
+ const { tooltipNode: a, ...r } = n || {}, d = () => {
70
+ const l = /* @__PURE__ */ t(D, { adjustWidthOn: s === "small" ? "parent" : "min-width", ...r });
71
+ return a ? /* @__PURE__ */ t(Q, { content: a, placement: "top", width: 270, children: l }) : l;
45
72
  };
46
- return /* @__PURE__ */ d("div", { className: u("modal-footer", { "with-extra-node": o, [`size-${a}`]: a }), children: [
47
- o && o,
48
- /* @__PURE__ */ d("div", { className: u("buttons-block"), children: [
49
- _ && /* @__PURE__ */ e("div", { className: u("button-container"), children: /* @__PURE__ */ e(
50
- A,
73
+ return /* @__PURE__ */ u("div", { className: f("modal-footer", { "with-extra-node": e, [`size-${s}`]: s }), children: [
74
+ e && e,
75
+ /* @__PURE__ */ u("div", { className: f("buttons-block"), children: [
76
+ c && /* @__PURE__ */ t("div", { className: f("button-container"), children: /* @__PURE__ */ t(
77
+ D,
51
78
  {
52
79
  variant: "ghost",
53
- adjustWidthOn: a === "small" ? "parent" : "min-width",
54
- onClick: n,
55
- ..._
80
+ adjustWidthOn: s === "small" ? "parent" : "min-width",
81
+ onClick: o,
82
+ ...c
56
83
  }
57
84
  ) }),
58
- l && /* @__PURE__ */ e("div", { className: u("button-container"), children: g() })
85
+ n && /* @__PURE__ */ t("div", { className: f("button-container"), children: d() })
59
86
  ] })
60
87
  ] });
61
- }, le = {
88
+ }, at = {
62
89
  "modal-header": "_modal-header_w4aaf_1",
63
90
  "width-description": "_width-description_w4aaf_10",
64
91
  "modal-header-content": "_modal-header-content_w4aaf_14",
65
92
  "modal-title": "_modal-title_w4aaf_20",
66
93
  "close-modal-icon": "_close-modal-icon_w4aaf_29"
67
- }, w = y.bind(le), ae = ({ title: o, onClose: n, withDescription: l = !1 }) => /* @__PURE__ */ d("div", { className: w("modal-header", { "width-description": l }), children: [
68
- /* @__PURE__ */ e("div", { className: w("modal-header-content"), children: o && /* @__PURE__ */ e("div", { className: w("modal-title"), children: o }) }),
69
- /* @__PURE__ */ e(J, { className: w("close-modal-icon"), onClick: n, children: /* @__PURE__ */ e(Q, {}) })
70
- ] }), se = "_modal_yxql5_1", ie = "_description_yxql5_43", de = "_scrollable_yxql5_53", ce = {
71
- modal: se,
94
+ }, p = x.bind(at), rt = ({ title: e, onClose: o, withDescription: n = !1 }) => /* @__PURE__ */ u("div", { className: p("modal-header", { "width-description": n }), children: [
95
+ /* @__PURE__ */ t("div", { className: p("modal-header-content"), children: e && /* @__PURE__ */ t("div", { className: p("modal-title"), children: e }) }),
96
+ /* @__PURE__ */ t(V, { className: p("close-modal-icon"), onClick: o, children: /* @__PURE__ */ t(Z, {}) })
97
+ ] }), ct = "_modal_yxql5_1", dt = "_description_yxql5_43", mt = "_scrollable_yxql5_53", _t = {
98
+ modal: ct,
72
99
  "overlay-default": "_overlay-default_yxql5_12",
73
100
  "overlay-light-cyan": "_overlay-light-cyan_yxql5_16",
74
101
  "scrolling-content": "_scrolling-content_yxql5_20",
75
102
  "modal-window": "_modal-window_yxql5_26",
76
- description: ie,
77
- scrollable: de,
103
+ description: dt,
104
+ scrollable: mt,
78
105
  "size-default": "_size-default_yxql5_57",
79
106
  "size-small": "_size-small_yxql5_69",
80
107
  "size-large": "_size-large_yxql5_81"
81
- }, f = y.bind(ce), re = 0.9, me = 32 + 24, _e = 32 + 8, he = 36 + 16, ue = 32 * 2, Ae = ({
82
- title: o,
83
- children: n,
84
- footerNode: l,
85
- okButton: _,
86
- cancelButton: a,
87
- className: h,
88
- size: c = "default",
89
- onClose: g = () => {
108
+ }, g = x.bind(_t), ut = 0.9, ht = 32 + 24, wt = 32 + 8, ft = 36 + 16, pt = 32 * 2, $t = ({
109
+ title: e,
110
+ children: o,
111
+ footerNode: n,
112
+ okButton: c,
113
+ cancelButton: s,
114
+ className: a,
115
+ size: r = "default",
116
+ onClose: d = () => {
90
117
  },
91
- overlay: r = "default",
92
- zIndex: T = 2,
93
- allowCloseOutside: D = !0,
94
- scrollable: v = !1,
95
- withoutFooter: H = !1,
96
- createFooter: E = null,
97
- description: s = null
118
+ overlay: l = "default",
119
+ zIndex: E = 2,
120
+ allowCloseOutside: v = !0,
121
+ scrollable: H = !1,
122
+ withoutFooter: O = !1,
123
+ createFooter: M = null,
124
+ description: m = null
98
125
  }) => {
99
- const [S, M] = p(!1), [k, I] = p(0), [q, L] = p(!1), i = j(null), N = V(), O = N.height, $ = O * re, x = (O - k) / 2, R = () => {
100
- let t = $ - ue;
101
- return H || (t = t - he), s ? t = t - _e : t = t - me, t;
102
- }, m = () => {
103
- M(!1);
104
- }, z = (t) => {
105
- const { keyCode: B } = t;
106
- B === U.ESCAPE_KEY_CODE && m();
107
- }, W = () => {
108
- var t;
109
- q || ((t = i.current) == null || t.focus(), L(!0));
126
+ const [I, N] = y(!1), [L, R] = y(0), [k, $] = y(!1), _ = C(null), A = et(), T = A.height, q = T * ut, b = (T - L) / 2, W = () => {
127
+ let i = q - pt;
128
+ return O || (i = i - ft), m ? i = i - wt : i = i - ht, i;
129
+ }, h = () => {
130
+ N(!1);
131
+ }, z = (i) => {
132
+ const { keyCode: j } = i;
133
+ j === J.ESCAPE_KEY_CODE && h();
134
+ }, P = () => {
135
+ var i;
136
+ k || ((i = _.current) == null || i.focus(), $(!0));
110
137
  };
111
- return b(() => {
112
- if (i && i.current) {
113
- const { clientHeight: t } = i.current;
114
- I(t);
138
+ w(() => {
139
+ if (_ && _.current) {
140
+ const { clientHeight: i } = _.current;
141
+ R(i);
115
142
  }
116
- }, [n, N]), b(() => (M(!0), document.addEventListener("keydown", z, !1), () => document.removeEventListener("keydown", z, !1)), []), Y(i, D ? m : void 0), /* @__PURE__ */ e(G, { onExitComplete: g, children: S && /* @__PURE__ */ e("div", { className: f("modal", { [`overlay-${r}`]: r }), style: { zIndex: T }, children: /* @__PURE__ */ d(
117
- K.div,
143
+ }, [o, A]), w(() => (N(!0), document.addEventListener("keydown", z, !1), () => document.removeEventListener("keydown", z, !1)), []);
144
+ const B = G(
145
+ () => ({
146
+ ignoreSelectors: [`[${X}]`]
147
+ }),
148
+ []
149
+ );
150
+ return tt(_, v ? h : void 0, B), /* @__PURE__ */ t(U, { onExitComplete: d, children: I && /* @__PURE__ */ t("div", { className: g("modal", { [`overlay-${l}`]: l }), style: { zIndex: E }, children: /* @__PURE__ */ u(
151
+ Y.div,
118
152
  {
119
- className: f("modal-window", { [`size-${c}`]: c }, h),
120
- ref: i,
153
+ className: g("modal-window", { [`size-${r}`]: r }, a),
154
+ ref: _,
121
155
  tabIndex: 0,
122
- initial: { opacity: 0, marginTop: -x },
123
- animate: { opacity: 1, marginTop: x },
124
- exit: { opacity: 0, marginTop: -x },
156
+ initial: { opacity: 0, marginTop: -b },
157
+ animate: { opacity: 1, marginTop: b },
158
+ exit: { opacity: 0, marginTop: -b },
125
159
  transition: { duration: 0.3 },
126
- onAnimationStart: W,
160
+ onAnimationStart: P,
127
161
  children: [
128
- /* @__PURE__ */ e(ae, { title: o, onClose: m, withDescription: !!s }),
129
- v ? /* @__PURE__ */ d(F, { autoHeight: !0, autoHeightMax: R(), hideTracksWhenNotNeeded: !0, children: [
130
- s && /* @__PURE__ */ e("span", { className: f("description", { scrollable: v }), children: s }),
131
- /* @__PURE__ */ e(C, { scrollable: !0, children: n })
132
- ] }) : /* @__PURE__ */ d(P, { children: [
133
- s && /* @__PURE__ */ e("span", { className: f("description"), children: s }),
134
- /* @__PURE__ */ e(C, { children: n })
162
+ /* @__PURE__ */ t(rt, { title: e, onClose: h, withDescription: !!m }),
163
+ H ? /* @__PURE__ */ u(K, { autoHeight: !0, autoHeightMax: W(), hideTracksWhenNotNeeded: !0, children: [
164
+ m && /* @__PURE__ */ t("span", { className: g("description", { scrollable: H }), children: m }),
165
+ /* @__PURE__ */ t(S, { scrollable: !0, children: o })
166
+ ] }) : /* @__PURE__ */ u(F, { children: [
167
+ m && /* @__PURE__ */ t("span", { className: g("description"), children: m }),
168
+ /* @__PURE__ */ t(S, { children: o })
135
169
  ] }),
136
- !H && (E ? E(m) : /* @__PURE__ */ e(
137
- ne,
170
+ !O && (M ? M(h) : /* @__PURE__ */ t(
171
+ lt,
138
172
  {
139
- size: c,
140
- footerNode: l,
141
- okButton: _,
142
- cancelButton: a,
143
- closeHandler: m
173
+ size: r,
174
+ footerNode: n,
175
+ okButton: c,
176
+ cancelButton: s,
177
+ closeHandler: h
144
178
  }
145
179
  ))
146
180
  ]
@@ -149,8 +183,8 @@ const V = () => {
149
183
  ) }) });
150
184
  };
151
185
  export {
152
- Ae as Modal,
153
- C as ModalContent,
154
- ne as ModalFooter,
155
- ae as ModalHeader
186
+ $t as Modal,
187
+ S as ModalContent,
188
+ lt as ModalFooter,
189
+ rt as ModalHeader
156
190
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reportportal/ui-kit",
3
- "version": "0.0.1-alpha.127",
3
+ "version": "0.0.1-alpha.129",
4
4
  "description": "The UI-kit library for ReportPortal Design System.",
5
5
  "type": "module",
6
6
  "scripts": {