@reportportal/ui-kit 0.0.1-alpha.159 → 0.0.1-alpha.160

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