@reportportal/ui-kit 0.0.1-alpha.126 → 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/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-1a104b97.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-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
- 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,157 @@
1
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";
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 y } from "./bind-06a7ff84.js";
6
- import { u as Y } from "./useOnClickOutside-c332f7d3.js";
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 X } from "./tooltip.js";
10
- import { B as J } from "./baseIconButton-251479f7.js";
11
- import { S as Q } from "./close-4d480ef7.js";
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 [o, n] = p({ width: 0, height: 0 });
17
- return b(() => {
18
- const l = () => {
19
- n({
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", l), l(), () => window.removeEventListener("resize", l);
25
- }, []), o;
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 = y.bind(ee), C = ({ scrollable: o = !1, children: n }) => /* @__PURE__ */ e("div", { className: te("modal-content", { scrollable: o }), children: n }), oe = {
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 = y.bind(oe), ne = ({
36
- footerNode: o,
37
- closeHandler: n,
38
- okButton: l,
39
- cancelButton: _,
40
- size: a
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, ...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;
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": o, [`size-${a}`]: a }), children: [
47
- o && o,
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
- _ && /* @__PURE__ */ e("div", { className: u("button-container"), children: /* @__PURE__ */ e(
60
+ l && /* @__PURE__ */ e("div", { className: u("button-container"), children: /* @__PURE__ */ e(
50
61
  A,
51
62
  {
52
63
  variant: "ghost",
53
- adjustWidthOn: a === "small" ? "parent" : "min-width",
54
- onClick: n,
55
- ..._
64
+ adjustWidthOn: s === "small" ? "parent" : "min-width",
65
+ onClick: o,
66
+ ...l
56
67
  }
57
68
  ) }),
58
- l && /* @__PURE__ */ e("div", { className: u("button-container"), children: g() })
69
+ i && /* @__PURE__ */ e("div", { className: u("button-container"), children: x() })
59
70
  ] })
60
71
  ] });
61
- }, le = {
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 = 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 = {
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: ie,
77
- scrollable: de,
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 = 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,
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: c = "default",
89
- onClose: g = () => {
99
+ size: r = "default",
100
+ onClose: x = () => {
90
101
  },
91
- overlay: r = "default",
102
+ overlay: m = "default",
92
103
  zIndex: T = 2,
93
104
  allowCloseOutside: D = !0,
94
- scrollable: v = !1,
95
- withoutFooter: H = !1,
96
- createFooter: E = null,
97
- description: s = null
105
+ scrollable: b = !1,
106
+ withoutFooter: E = !1,
107
+ createFooter: H = null,
108
+ description: a = null
98
109
  }) => {
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 = () => {
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 = (t) => {
105
- const { keyCode: B } = t;
106
- B === U.ESCAPE_KEY_CODE && m();
115
+ }, z = (n) => {
116
+ const { keyCode: B } = n;
117
+ B === Y.ESCAPE_KEY_CODE && _();
107
118
  }, W = () => {
108
- var t;
109
- q || ((t = i.current) == null || t.focus(), L(!0));
119
+ var n;
120
+ I || ((n = c.current) == null || n.focus(), q(!0));
110
121
  };
111
- return b(() => {
112
- if (i && i.current) {
113
- const { clientHeight: t } = i.current;
114
- I(t);
122
+ return y(() => {
123
+ if (c && c.current) {
124
+ const { clientHeight: n } = c.current;
125
+ k(n);
115
126
  }
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(
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-${c}`]: c }, h),
120
- ref: i,
130
+ className: f("modal-window", { [`size-${r}`]: r }, h),
131
+ ref: c,
121
132
  tabIndex: 0,
122
- initial: { opacity: 0, marginTop: -x },
123
- animate: { opacity: 1, marginTop: x },
124
- exit: { opacity: 0, marginTop: -x },
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(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 })
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
- s && /* @__PURE__ */ e("span", { className: f("description"), children: s }),
134
- /* @__PURE__ */ e(C, { children: n })
144
+ a && /* @__PURE__ */ e("span", { className: f("description"), children: a }),
145
+ /* @__PURE__ */ e(C, { children: o })
135
146
  ] }),
136
- !H && (E ? E(m) : /* @__PURE__ */ e(
147
+ !E && (H ? H(_) : /* @__PURE__ */ e(
137
148
  ne,
138
149
  {
139
- size: c,
140
- footerNode: l,
141
- okButton: _,
142
- cancelButton: a,
143
- closeHandler: m
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
- Ae as Modal,
163
+ ze as Modal,
153
164
  C as ModalContent,
154
165
  ne as ModalFooter,
155
- ae as ModalHeader
166
+ le as ModalHeader
156
167
  };