@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/common/hooks/useOnClickOutside.d.ts +4 -1
- package/dist/components/dropdown/constants.d.ts +1 -0
- package/dist/components/dropdown/dropdown.d.ts +7 -0
- package/dist/components/dropdown/index.d.ts +1 -0
- package/dist/{datePicker-322bcafa.js → datePicker-12bb6fb4.js} +1 -1
- package/dist/datePicker.js +5 -6
- package/dist/dropdown-a99520ba.js +543 -0
- package/dist/dropdown.js +4 -3
- package/dist/index.js +140 -141
- package/dist/modal.js +138 -104
- 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-12bb6fb4.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-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
|
-
|
|
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,180 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import { Scrollbars as
|
|
4
|
-
import { AnimatePresence as
|
|
5
|
-
import { c as
|
|
6
|
-
import {
|
|
7
|
-
import { K as
|
|
8
|
-
import { B as
|
|
9
|
-
import { Tooltip as
|
|
10
|
-
import { B as
|
|
11
|
-
import { S as
|
|
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
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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",
|
|
25
|
-
}, []),
|
|
26
|
-
},
|
|
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:
|
|
29
|
-
},
|
|
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
|
-
},
|
|
36
|
-
footerNode:
|
|
37
|
-
closeHandler:
|
|
38
|
-
okButton:
|
|
39
|
-
cancelButton:
|
|
40
|
-
size:
|
|
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:
|
|
43
|
-
const
|
|
44
|
-
return
|
|
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__ */
|
|
47
|
-
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
|
|
50
|
-
|
|
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:
|
|
54
|
-
onClick:
|
|
55
|
-
...
|
|
80
|
+
adjustWidthOn: s === "small" ? "parent" : "min-width",
|
|
81
|
+
onClick: o,
|
|
82
|
+
...c
|
|
56
83
|
}
|
|
57
84
|
) }),
|
|
58
|
-
|
|
85
|
+
n && /* @__PURE__ */ t("div", { className: f("button-container"), children: d() })
|
|
59
86
|
] })
|
|
60
87
|
] });
|
|
61
|
-
},
|
|
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
|
-
},
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
] }),
|
|
71
|
-
modal:
|
|
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:
|
|
77
|
-
scrollable:
|
|
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
|
-
},
|
|
82
|
-
title:
|
|
83
|
-
children:
|
|
84
|
-
footerNode:
|
|
85
|
-
okButton:
|
|
86
|
-
cancelButton:
|
|
87
|
-
className:
|
|
88
|
-
size:
|
|
89
|
-
onClose:
|
|
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:
|
|
92
|
-
zIndex:
|
|
93
|
-
allowCloseOutside:
|
|
94
|
-
scrollable:
|
|
95
|
-
withoutFooter:
|
|
96
|
-
createFooter:
|
|
97
|
-
description:
|
|
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 [
|
|
100
|
-
let
|
|
101
|
-
return
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
}, z = (
|
|
105
|
-
const { keyCode:
|
|
106
|
-
|
|
107
|
-
},
|
|
108
|
-
var
|
|
109
|
-
|
|
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
|
-
|
|
112
|
-
if (
|
|
113
|
-
const { clientHeight:
|
|
114
|
-
|
|
138
|
+
w(() => {
|
|
139
|
+
if (_ && _.current) {
|
|
140
|
+
const { clientHeight: i } = _.current;
|
|
141
|
+
R(i);
|
|
115
142
|
}
|
|
116
|
-
}, [
|
|
117
|
-
|
|
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:
|
|
120
|
-
ref:
|
|
153
|
+
className: g("modal-window", { [`size-${r}`]: r }, a),
|
|
154
|
+
ref: _,
|
|
121
155
|
tabIndex: 0,
|
|
122
|
-
initial: { opacity: 0, marginTop: -
|
|
123
|
-
animate: { opacity: 1, marginTop:
|
|
124
|
-
exit: { opacity: 0, marginTop: -
|
|
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:
|
|
160
|
+
onAnimationStart: P,
|
|
127
161
|
children: [
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
/* @__PURE__ */
|
|
132
|
-
] }) : /* @__PURE__ */
|
|
133
|
-
|
|
134
|
-
/* @__PURE__ */
|
|
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
|
-
!
|
|
137
|
-
|
|
170
|
+
!O && (M ? M(h) : /* @__PURE__ */ t(
|
|
171
|
+
lt,
|
|
138
172
|
{
|
|
139
|
-
size:
|
|
140
|
-
footerNode:
|
|
141
|
-
okButton:
|
|
142
|
-
cancelButton:
|
|
143
|
-
closeHandler:
|
|
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
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
186
|
+
$t as Modal,
|
|
187
|
+
S as ModalContent,
|
|
188
|
+
lt as ModalFooter,
|
|
189
|
+
rt as ModalHeader
|
|
156
190
|
};
|