@reportportal/ui-kit 0.0.1-alpha.127 → 0.0.1-alpha.128
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/components/dropdown/dropdown.d.ts +7 -0
- package/dist/{datePicker-322bcafa.js → datePicker-1a104b97.js} +1 -1
- package/dist/datePicker.js +5 -6
- package/dist/dropdown-1f7b1881.js +538 -0
- package/dist/dropdown.js +2 -3
- package/dist/index.js +140 -141
- package/dist/modal.js +94 -83
- package/package.json +1 -1
- package/dist/dropdown-18c58189.js +0 -448
- package/dist/useOnClickOutside-c332f7d3.js +0 -16
package/dist/index.js
CHANGED
|
@@ -1,158 +1,157 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { B as
|
|
3
|
-
import { B as
|
|
4
|
-
import { B
|
|
5
|
-
import { B as
|
|
6
|
-
import { C as
|
|
7
|
-
import { D as
|
|
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-1a104b97.js";
|
|
8
8
|
import "react-datepicker";
|
|
9
|
-
import { D as
|
|
10
|
-
import { FieldLabel as
|
|
11
|
-
import { F as
|
|
12
|
-
import { F as
|
|
13
|
-
import { F as
|
|
14
|
-
import { FileDropArea as
|
|
15
|
-
import { FiltersButton as
|
|
16
|
-
import { Modal as
|
|
17
|
-
import { MultipleAutocomplete as
|
|
18
|
-
import { P as
|
|
19
|
-
import { Popover as
|
|
20
|
-
import { R as
|
|
21
|
-
import { S as
|
|
22
|
-
import { S as
|
|
23
|
-
import { SystemAlert as
|
|
24
|
-
import { S as
|
|
25
|
-
import { T as
|
|
26
|
-
import { T as
|
|
27
|
-
import { T as
|
|
28
|
-
import { Tooltip as
|
|
29
|
-
import { SidePanel as
|
|
30
|
-
import { AddCsvIcon as
|
|
31
|
-
import { S as
|
|
32
|
-
import { S as
|
|
33
|
-
import { S as
|
|
34
|
-
import { S as
|
|
35
|
-
import { S as
|
|
36
|
-
import { S as
|
|
37
|
-
import { S as
|
|
38
|
-
import { S as
|
|
39
|
-
import { S as
|
|
40
|
-
import { S as
|
|
41
|
-
import { S as
|
|
42
|
-
import { S as
|
|
43
|
-
import { S as
|
|
9
|
+
import { D as k } from "./dropdown-1f7b1881.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
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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,157 @@
|
|
|
1
1
|
import { jsx as e, jsxs as d, Fragment as P } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useEffect as y, useState as p, useRef as j } from "react";
|
|
3
3
|
import { Scrollbars as F } from "rc-scrollbars";
|
|
4
4
|
import { AnimatePresence as G, motion as K } from "framer-motion";
|
|
5
|
-
import { c as
|
|
6
|
-
import {
|
|
7
|
-
import { K as U } from "./keyCodes-f63c0e11.js";
|
|
5
|
+
import { c as g } from "./bind-06a7ff84.js";
|
|
6
|
+
import { K as Y } from "./keyCodes-f63c0e11.js";
|
|
8
7
|
import { B as A } from "./button-97d9e587.js";
|
|
9
|
-
import { Tooltip as
|
|
10
|
-
import { B as
|
|
11
|
-
import { S as
|
|
8
|
+
import { Tooltip as U } from "./tooltip.js";
|
|
9
|
+
import { B as X } from "./baseIconButton-251479f7.js";
|
|
10
|
+
import { S as J } from "./close-4d480ef7.js";
|
|
12
11
|
import "react-dom";
|
|
13
12
|
import "@floating-ui/react";
|
|
14
13
|
import "./floatingUi-41f8c7b5.js";
|
|
14
|
+
function Q(t, o) {
|
|
15
|
+
y(() => {
|
|
16
|
+
if (!o)
|
|
17
|
+
return;
|
|
18
|
+
const i = (l) => {
|
|
19
|
+
t && t.current && !t.current.contains(l.target) && o(l);
|
|
20
|
+
};
|
|
21
|
+
return document.addEventListener("pointerdown", i), () => {
|
|
22
|
+
document.removeEventListener("pointerdown", i);
|
|
23
|
+
};
|
|
24
|
+
}, [t, o]);
|
|
25
|
+
}
|
|
15
26
|
const V = () => {
|
|
16
|
-
const [
|
|
17
|
-
return
|
|
18
|
-
const
|
|
19
|
-
|
|
27
|
+
const [t, o] = p({ width: 0, height: 0 });
|
|
28
|
+
return y(() => {
|
|
29
|
+
const i = () => {
|
|
30
|
+
o({
|
|
20
31
|
width: window.innerWidth,
|
|
21
32
|
height: window.innerHeight
|
|
22
33
|
});
|
|
23
34
|
};
|
|
24
|
-
return window.addEventListener("resize",
|
|
25
|
-
}, []),
|
|
35
|
+
return window.addEventListener("resize", i), i(), () => window.removeEventListener("resize", i);
|
|
36
|
+
}, []), t;
|
|
26
37
|
}, Z = "_scrollable_zh8d2_12", ee = {
|
|
27
38
|
"modal-content": "_modal-content_zh8d2_1",
|
|
28
39
|
scrollable: Z
|
|
29
|
-
}, te =
|
|
40
|
+
}, te = g.bind(ee), C = ({ scrollable: t = !1, children: o }) => /* @__PURE__ */ e("div", { className: te("modal-content", { scrollable: t }), children: o }), oe = {
|
|
30
41
|
"buttons-block": "_buttons-block_1mwne_1",
|
|
31
42
|
"button-container": "_button-container_1mwne_7",
|
|
32
43
|
"modal-footer": "_modal-footer_1mwne_12",
|
|
33
44
|
"with-extra-node": "_with-extra-node_1mwne_19",
|
|
34
45
|
"size-small": "_size-small_1mwne_23"
|
|
35
|
-
}, u =
|
|
36
|
-
footerNode:
|
|
37
|
-
closeHandler:
|
|
38
|
-
okButton:
|
|
39
|
-
cancelButton:
|
|
40
|
-
size:
|
|
46
|
+
}, u = g.bind(oe), ne = ({
|
|
47
|
+
footerNode: t,
|
|
48
|
+
closeHandler: o,
|
|
49
|
+
okButton: i,
|
|
50
|
+
cancelButton: l,
|
|
51
|
+
size: s
|
|
41
52
|
}) => {
|
|
42
|
-
const { tooltipNode: h, ...
|
|
43
|
-
const
|
|
44
|
-
return h ? /* @__PURE__ */ e(
|
|
53
|
+
const { tooltipNode: h, ...r } = i || {}, x = () => {
|
|
54
|
+
const m = /* @__PURE__ */ e(A, { adjustWidthOn: s === "small" ? "parent" : "min-width", ...r });
|
|
55
|
+
return h ? /* @__PURE__ */ e(U, { content: h, placement: "top", width: 270, children: m }) : m;
|
|
45
56
|
};
|
|
46
|
-
return /* @__PURE__ */ d("div", { className: u("modal-footer", { "with-extra-node":
|
|
47
|
-
|
|
57
|
+
return /* @__PURE__ */ d("div", { className: u("modal-footer", { "with-extra-node": t, [`size-${s}`]: s }), children: [
|
|
58
|
+
t && t,
|
|
48
59
|
/* @__PURE__ */ d("div", { className: u("buttons-block"), children: [
|
|
49
|
-
|
|
60
|
+
l && /* @__PURE__ */ e("div", { className: u("button-container"), children: /* @__PURE__ */ e(
|
|
50
61
|
A,
|
|
51
62
|
{
|
|
52
63
|
variant: "ghost",
|
|
53
|
-
adjustWidthOn:
|
|
54
|
-
onClick:
|
|
55
|
-
...
|
|
64
|
+
adjustWidthOn: s === "small" ? "parent" : "min-width",
|
|
65
|
+
onClick: o,
|
|
66
|
+
...l
|
|
56
67
|
}
|
|
57
68
|
) }),
|
|
58
|
-
|
|
69
|
+
i && /* @__PURE__ */ e("div", { className: u("button-container"), children: x() })
|
|
59
70
|
] })
|
|
60
71
|
] });
|
|
61
|
-
},
|
|
72
|
+
}, ie = {
|
|
62
73
|
"modal-header": "_modal-header_w4aaf_1",
|
|
63
74
|
"width-description": "_width-description_w4aaf_10",
|
|
64
75
|
"modal-header-content": "_modal-header-content_w4aaf_14",
|
|
65
76
|
"modal-title": "_modal-title_w4aaf_20",
|
|
66
77
|
"close-modal-icon": "_close-modal-icon_w4aaf_29"
|
|
67
|
-
}, w =
|
|
68
|
-
/* @__PURE__ */ e("div", { className: w("modal-header-content"), children:
|
|
69
|
-
/* @__PURE__ */ e(
|
|
70
|
-
] }), se = "_modal_yxql5_1",
|
|
78
|
+
}, w = g.bind(ie), le = ({ title: t, onClose: o, withDescription: i = !1 }) => /* @__PURE__ */ d("div", { className: w("modal-header", { "width-description": i }), children: [
|
|
79
|
+
/* @__PURE__ */ e("div", { className: w("modal-header-content"), children: t && /* @__PURE__ */ e("div", { className: w("modal-title"), children: t }) }),
|
|
80
|
+
/* @__PURE__ */ e(X, { className: w("close-modal-icon"), onClick: o, children: /* @__PURE__ */ e(J, {}) })
|
|
81
|
+
] }), se = "_modal_yxql5_1", ae = "_description_yxql5_43", ce = "_scrollable_yxql5_53", de = {
|
|
71
82
|
modal: se,
|
|
72
83
|
"overlay-default": "_overlay-default_yxql5_12",
|
|
73
84
|
"overlay-light-cyan": "_overlay-light-cyan_yxql5_16",
|
|
74
85
|
"scrolling-content": "_scrolling-content_yxql5_20",
|
|
75
86
|
"modal-window": "_modal-window_yxql5_26",
|
|
76
|
-
description:
|
|
77
|
-
scrollable:
|
|
87
|
+
description: ae,
|
|
88
|
+
scrollable: ce,
|
|
78
89
|
"size-default": "_size-default_yxql5_57",
|
|
79
90
|
"size-small": "_size-small_yxql5_69",
|
|
80
91
|
"size-large": "_size-large_yxql5_81"
|
|
81
|
-
}, f =
|
|
82
|
-
title:
|
|
83
|
-
children:
|
|
84
|
-
footerNode:
|
|
85
|
-
okButton:
|
|
86
|
-
cancelButton:
|
|
92
|
+
}, f = g.bind(de), re = 0.9, me = 32 + 24, _e = 32 + 8, he = 36 + 16, ue = 32 * 2, ze = ({
|
|
93
|
+
title: t,
|
|
94
|
+
children: o,
|
|
95
|
+
footerNode: i,
|
|
96
|
+
okButton: l,
|
|
97
|
+
cancelButton: s,
|
|
87
98
|
className: h,
|
|
88
|
-
size:
|
|
89
|
-
onClose:
|
|
99
|
+
size: r = "default",
|
|
100
|
+
onClose: x = () => {
|
|
90
101
|
},
|
|
91
|
-
overlay:
|
|
102
|
+
overlay: m = "default",
|
|
92
103
|
zIndex: T = 2,
|
|
93
104
|
allowCloseOutside: D = !0,
|
|
94
|
-
scrollable:
|
|
95
|
-
withoutFooter:
|
|
96
|
-
createFooter:
|
|
97
|
-
description:
|
|
105
|
+
scrollable: b = !1,
|
|
106
|
+
withoutFooter: E = !1,
|
|
107
|
+
createFooter: H = null,
|
|
108
|
+
description: a = null
|
|
98
109
|
}) => {
|
|
99
|
-
const [
|
|
100
|
-
let
|
|
101
|
-
return
|
|
102
|
-
},
|
|
110
|
+
const [L, M] = p(!1), [S, k] = p(0), [I, q] = p(!1), c = j(null), N = V(), O = N.height, $ = O * re, v = (O - S) / 2, R = () => {
|
|
111
|
+
let n = $ - ue;
|
|
112
|
+
return E || (n = n - he), a ? n = n - _e : n = n - me, n;
|
|
113
|
+
}, _ = () => {
|
|
103
114
|
M(!1);
|
|
104
|
-
}, z = (
|
|
105
|
-
const { keyCode: B } =
|
|
106
|
-
B ===
|
|
115
|
+
}, z = (n) => {
|
|
116
|
+
const { keyCode: B } = n;
|
|
117
|
+
B === Y.ESCAPE_KEY_CODE && _();
|
|
107
118
|
}, W = () => {
|
|
108
|
-
var
|
|
109
|
-
|
|
119
|
+
var n;
|
|
120
|
+
I || ((n = c.current) == null || n.focus(), q(!0));
|
|
110
121
|
};
|
|
111
|
-
return
|
|
112
|
-
if (
|
|
113
|
-
const { clientHeight:
|
|
114
|
-
|
|
122
|
+
return y(() => {
|
|
123
|
+
if (c && c.current) {
|
|
124
|
+
const { clientHeight: n } = c.current;
|
|
125
|
+
k(n);
|
|
115
126
|
}
|
|
116
|
-
}, [
|
|
127
|
+
}, [o, N]), y(() => (M(!0), document.addEventListener("keydown", z, !1), () => document.removeEventListener("keydown", z, !1)), []), Q(c, D ? _ : void 0), /* @__PURE__ */ e(G, { onExitComplete: x, children: L && /* @__PURE__ */ e("div", { className: f("modal", { [`overlay-${m}`]: m }), style: { zIndex: T }, children: /* @__PURE__ */ d(
|
|
117
128
|
K.div,
|
|
118
129
|
{
|
|
119
|
-
className: f("modal-window", { [`size-${
|
|
120
|
-
ref:
|
|
130
|
+
className: f("modal-window", { [`size-${r}`]: r }, h),
|
|
131
|
+
ref: c,
|
|
121
132
|
tabIndex: 0,
|
|
122
|
-
initial: { opacity: 0, marginTop: -
|
|
123
|
-
animate: { opacity: 1, marginTop:
|
|
124
|
-
exit: { opacity: 0, marginTop: -
|
|
133
|
+
initial: { opacity: 0, marginTop: -v },
|
|
134
|
+
animate: { opacity: 1, marginTop: v },
|
|
135
|
+
exit: { opacity: 0, marginTop: -v },
|
|
125
136
|
transition: { duration: 0.3 },
|
|
126
137
|
onAnimationStart: W,
|
|
127
138
|
children: [
|
|
128
|
-
/* @__PURE__ */ e(
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
/* @__PURE__ */ e(C, { scrollable: !0, children:
|
|
139
|
+
/* @__PURE__ */ e(le, { title: t, onClose: _, withDescription: !!a }),
|
|
140
|
+
b ? /* @__PURE__ */ d(F, { autoHeight: !0, autoHeightMax: R(), hideTracksWhenNotNeeded: !0, children: [
|
|
141
|
+
a && /* @__PURE__ */ e("span", { className: f("description", { scrollable: b }), children: a }),
|
|
142
|
+
/* @__PURE__ */ e(C, { scrollable: !0, children: o })
|
|
132
143
|
] }) : /* @__PURE__ */ d(P, { children: [
|
|
133
|
-
|
|
134
|
-
/* @__PURE__ */ e(C, { children:
|
|
144
|
+
a && /* @__PURE__ */ e("span", { className: f("description"), children: a }),
|
|
145
|
+
/* @__PURE__ */ e(C, { children: o })
|
|
135
146
|
] }),
|
|
136
|
-
!
|
|
147
|
+
!E && (H ? H(_) : /* @__PURE__ */ e(
|
|
137
148
|
ne,
|
|
138
149
|
{
|
|
139
|
-
size:
|
|
140
|
-
footerNode:
|
|
141
|
-
okButton:
|
|
142
|
-
cancelButton:
|
|
143
|
-
closeHandler:
|
|
150
|
+
size: r,
|
|
151
|
+
footerNode: i,
|
|
152
|
+
okButton: l,
|
|
153
|
+
cancelButton: s,
|
|
154
|
+
closeHandler: _
|
|
144
155
|
}
|
|
145
156
|
))
|
|
146
157
|
]
|
|
@@ -149,8 +160,8 @@ const V = () => {
|
|
|
149
160
|
) }) });
|
|
150
161
|
};
|
|
151
162
|
export {
|
|
152
|
-
|
|
163
|
+
ze as Modal,
|
|
153
164
|
C as ModalContent,
|
|
154
165
|
ne as ModalFooter,
|
|
155
|
-
|
|
166
|
+
le as ModalHeader
|
|
156
167
|
};
|