@reportportal/ui-kit 0.0.1-alpha.135 → 0.0.1-alpha.137

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.
Files changed (33) hide show
  1. package/dist/adaptiveTagList.js +189 -0
  2. package/dist/common/constants/sortable.d.ts +1 -0
  3. package/dist/common/hooks/index.d.ts +1 -0
  4. package/dist/common/hooks/useSortable.d.ts +3 -0
  5. package/dist/common/types/index.d.ts +2 -0
  6. package/dist/common/types/sortableTypes.d.ts +69 -0
  7. package/dist/common/utils/testUtils.d.ts +3 -0
  8. package/dist/components/adaptiveTagList/adaptiveTagList.d.ts +11 -0
  9. package/dist/components/adaptiveTagList/constants.d.ts +6 -0
  10. package/dist/components/adaptiveTagList/index.d.ts +2 -0
  11. package/dist/components/autocompletes/multipleAutocomplete/selectedItems/selectedItems.d.ts +1 -1
  12. package/dist/components/dropdown/constants.d.ts +1 -0
  13. package/dist/components/dropdown/dropdown.d.ts +2 -0
  14. package/dist/components/index.d.ts +2 -0
  15. package/dist/components/sortable/dragLayer/dragLayer.d.ts +3 -0
  16. package/dist/components/sortable/dragLayer/index.d.ts +1 -0
  17. package/dist/components/sortable/helpers.d.ts +4 -0
  18. package/dist/components/sortable/index.d.ts +3 -0
  19. package/dist/components/sortable/sortableItem/index.d.ts +1 -0
  20. package/dist/components/sortable/sortableItem/sortableItem.d.ts +3 -0
  21. package/dist/components/sortable/sortableList/index.d.ts +1 -0
  22. package/dist/components/sortable/sortableList/sortableList.d.ts +5 -0
  23. package/dist/{datePicker-926c9cae.js → datePicker-341db7a5.js} +1 -1
  24. package/dist/datePicker.js +8 -4
  25. package/dist/dropdown-0a043606.js +586 -0
  26. package/dist/dropdown.js +7 -3
  27. package/dist/index.js +148 -140
  28. package/dist/modal.js +17 -13
  29. package/dist/sortable.js +160 -0
  30. package/dist/style.css +1 -1
  31. package/package.json +3 -1
  32. package/dist/dropdown-360803d5.js +0 -550
  33. /package/dist/common/{types.d.ts → types/commonTypes.d.ts} +0 -0
package/dist/index.js CHANGED
@@ -1,49 +1,52 @@
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-926c9cae.js";
1
+ import { AdaptiveTagList as C } from "./adaptiveTagList.js";
2
+ import { A as D } from "./index-1a874a8b.js";
3
+ import { B as y } from "./baseIconButton-251479f7.js";
4
+ import { B as A } from "./breadcrumbs-8e5ca8d7.js";
5
+ import { B as h } from "./bubblesLoader-f3ffa240.js";
6
+ import { B as M } from "./button-97d9e587.js";
7
+ import { C as L } from "./checkbox-ed6cc375.js";
8
+ import { D as E } from "./datePicker-341db7a5.js";
8
9
  import "react-datepicker";
9
- import { D as k } from "./dropdown-360803d5.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-1749da7a.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-a3dee614.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-fc9f095d.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";
10
+ import { D as O } from "./dropdown-0a043606.js";
11
+ import { FieldLabel as H } from "./fieldLabel.js";
12
+ import { F as N } from "./fieldNumber-d1b5a7a1.js";
13
+ import { F as G } from "./fieldText-1749da7a.js";
14
+ import { F as X } from "./fieldTextFlex-2f51c173.js";
15
+ import { FileDropArea as q } from "./fileDropArea.js";
16
+ import { FiltersButton as Q } from "./filtersButton.js";
17
+ import { Modal as Y } from "./modal.js";
18
+ import { MultipleAutocomplete as _, SingleAutocomplete as $ } from "./autocompletes.js";
19
+ import { P as ro } from "./pagination-a3dee614.js";
20
+ import { Popover as to } from "./popover.js";
21
+ import { R as no } from "./radio-62546efa.js";
22
+ import { S as po } from "./selection-9124d029.js";
23
+ import { S as mo } from "./spinLoader-c4a53718.js";
24
+ import { SystemAlert as Io } from "./systemAlert.js";
25
+ import { S as xo } from "./systemMessage-924fdaa6.js";
26
+ import { DragLayer as uo, SortableItem as So, SortableList as Po } from "./sortable.js";
27
+ import { T as Co } from "./table-fc9f095d.js";
28
+ import { T as Do } from "./themeProvider-46c2be7b.js";
29
+ import { T as yo } from "./toggle-304107fa.js";
30
+ import { Tooltip as Ao } from "./tooltip.js";
31
+ import { SidePanel as ho } from "./sidePanel.js";
32
+ import { AddCsvIcon as Mo, AddImageIcon as wo, AddJarIcon as Lo, BreadcrumbsTreeIcon as ko, CalendarIcon as Eo, CheckmarkIcon as Ro, ChevronRightBreadcrumbsIcon as Oo, ConfigurationIcon as Uo, CopyIcon as Ho, CoverageFullIcon as Jo, CoveragePartialIcon as No, CoveredManuallyIcon as zo, DeleteIcon as Go, DragAndDropIcon as Wo, DragNDropIcon as Xo, DurationIcon as jo, EditIcon as qo, ExportIcon as Ko, FlagIcon as Qo, GroupByIcon as Vo, HideIcon as Yo, LaunchTypeIcon as Zo, MaximizeIcon as _o, MoveToFolderIcon as $o, PinFilledIcon as or, PinOutlineIcon as rr, PriorityBlockerIcon as er, PriorityCriticalIcon as tr, PriorityHighIcon as ar, PriorityLowIcon as nr, PriorityMediumIcon as cr, PriorityUnspecifiedIcon as pr, RefreshIcon as ir, RerunIcon as mr, RunManualIcon as sr, SearchIcon as Ir, SortIcon as lr, StatusSuccessIcon as xr, TestPlanIcon as fr, UserIcon as dr, WarningIcon as ur } from "./icons.js";
33
+ import { S as Pr, a as gr, b as Cr } from "./chevronDownDropdown-66f5b1af.js";
34
+ import { S as Dr } from "./calendarArrow-44c7e60e.js";
35
+ import { S as yr } from "./clear-53660571.js";
36
+ import { S as Ar, a as Br } from "./openEye-950159cb.js";
37
+ import { S as vr } from "./close-4d480ef7.js";
38
+ import { S as wr, a as Lr, b as kr, c as Er, d as Rr, e as Or, f as Ur } from "./xls-995781cc.js";
39
+ import { S as Jr } from "./dropdown-0260bb66.js";
40
+ import { S as zr, a as Gr, b as Wr } from "./success-8fd8bd2c.js";
41
+ import { S as jr, a as qr } from "./filterOutline-819b4b0d.js";
42
+ import { S as Qr, a as Vr } from "./tree-c3dd3d45.js";
43
+ import { S as Zr } from "./minus-2857540f.js";
44
+ import { S as $r } from "./plus-199fb2a8.js";
45
+ import { S as re, a as ee } from "./prevPage-87faf576.js";
44
46
  import "react/jsx-runtime";
45
47
  import "react";
46
48
  import "./bind-06a7ff84.js";
49
+ import "./isEmpty-ccacb5ff.js";
47
50
  import "./keyCodes-f63c0e11.js";
48
51
  import "react-datepicker/dist/es/index.js";
49
52
  import "react-dom";
@@ -51,107 +54,112 @@ import "@floating-ui/react-dom";
51
54
  import "downshift";
52
55
  import "rc-scrollbars";
53
56
  import "./maxValueDisplay-9be01a75.js";
54
- import "./isEmpty-ccacb5ff.js";
55
57
  import "react-dropzone";
56
58
  import "framer-motion";
59
+ import "react-dnd";
60
+ import "react-dnd-html5-backend";
57
61
  import "@floating-ui/react";
58
62
  import "./floatingUi-41f8c7b5.js";
59
63
  export {
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
64
+ C as AdaptiveTagList,
65
+ Mo as AddCsvIcon,
66
+ wo as AddImageIcon,
67
+ Lo as AddJarIcon,
68
+ Pr as ArrowDownIcon,
69
+ gr as ArrowUpIcon,
70
+ D as AttachedFile,
71
+ y as BaseIconButton,
72
+ A as Breadcrumbs,
73
+ ko as BreadcrumbsTreeIcon,
74
+ h as BubblesLoader,
75
+ M as Button,
76
+ Dr as CalendarArrowIcon,
77
+ Eo as CalendarIcon,
78
+ L as Checkbox,
79
+ Ro as CheckmarkIcon,
80
+ Cr as ChevronDownDropdownIcon,
81
+ Oo as ChevronRightBreadcrumbsIcon,
82
+ yr as ClearIcon,
83
+ Ar as CloseEyeIcon,
84
+ vr as CloseIcon,
85
+ Uo as ConfigurationIcon,
86
+ Ho as CopyIcon,
87
+ Jo as CoverageFullIcon,
88
+ No as CoveragePartialIcon,
89
+ zo as CoveredManuallyIcon,
90
+ wr as CsvIcon,
91
+ E as DatePicker,
92
+ Go as DeleteIcon,
93
+ Wo as DragAndDropIcon,
94
+ uo as DragLayer,
95
+ Xo as DragNDropIcon,
96
+ O as Dropdown,
97
+ Jr as DropdownIcon,
98
+ jo as DurationIcon,
99
+ qo as EditIcon,
100
+ zr as ErrorIcon,
101
+ Ko as ExportIcon,
102
+ Lr as ExternalLinkIcon,
103
+ H as FieldLabel,
104
+ N as FieldNumber,
105
+ G as FieldText,
106
+ X as FieldTextFlex,
107
+ q as FileDropArea,
108
+ kr as FileOtherIcon,
109
+ jr as FilterFilledIcon,
110
+ qr as FilterOutlineIcon,
111
+ Q as FiltersButton,
112
+ Qo as FlagIcon,
113
+ Vo as GroupByIcon,
114
+ Yo as HideIcon,
115
+ Er as ImageIcon,
116
+ Gr as InfoIcon,
117
+ Rr as JarIcon,
118
+ Zo as LaunchTypeIcon,
119
+ _o as MaximizeIcon,
120
+ Qr as MeatballMenuIcon,
121
+ Zr as MinusIcon,
122
+ Y as Modal,
123
+ $o as MoveToFolderIcon,
124
+ _ as MultipleAutocomplete,
125
+ Br as OpenEyeIcon,
126
+ ro as Pagination,
127
+ Or as PdfIcon,
128
+ or as PinFilledIcon,
129
+ rr as PinOutlineIcon,
130
+ $r as PlusIcon,
131
+ to as Popover,
132
+ re as PrevChapterIcon,
133
+ ee as PrevPageIcon,
134
+ er as PriorityBlockerIcon,
135
+ tr as PriorityCriticalIcon,
136
+ ar as PriorityHighIcon,
137
+ nr as PriorityLowIcon,
138
+ cr as PriorityMediumIcon,
139
+ pr as PriorityUnspecifiedIcon,
140
+ no as Radio,
141
+ ir as RefreshIcon,
142
+ mr as RerunIcon,
143
+ sr as RunManualIcon,
144
+ Ir as SearchIcon,
145
+ po as Selection,
146
+ ho as SidePanel,
147
+ $ as SingleAutocomplete,
148
+ lr as SortIcon,
149
+ So as SortableItem,
150
+ Po as SortableList,
151
+ mo as SpinLoader,
152
+ xr as StatusSuccessIcon,
153
+ Wr as SuccessIcon,
154
+ Io as SystemAlert,
155
+ xo as SystemMessage,
156
+ Co as Table,
157
+ fr as TestPlanIcon,
158
+ Do as ThemeProvider,
159
+ yo as Toggle,
160
+ Ao as Tooltip,
161
+ Vr as TreeIcon,
162
+ dr as UserIcon,
163
+ ur as WarningIcon,
164
+ Ur as XlsIcon
157
165
  };
package/dist/modal.js CHANGED
@@ -3,7 +3,9 @@ import { useRef as C, useEffect as w, useState as y, useMemo as G } from "react"
3
3
  import { Scrollbars as K } from "rc-scrollbars";
4
4
  import { AnimatePresence as U, motion as Y } from "framer-motion";
5
5
  import { c as x } from "./bind-06a7ff84.js";
6
- import { a as X } from "./dropdown-360803d5.js";
6
+ import "react-dnd";
7
+ import "react-dnd-html5-backend";
8
+ import { a as X } from "./dropdown-0a043606.js";
7
9
  import { K as J } from "./keyCodes-f63c0e11.js";
8
10
  import { B as D } from "./button-97d9e587.js";
9
11
  import { Tooltip as Q } from "./tooltip.js";
@@ -15,6 +17,8 @@ import "downshift";
15
17
  import "./clear-53660571.js";
16
18
  import "./dropdown-0260bb66.js";
17
19
  import "./fieldLabel.js";
20
+ import "./adaptiveTagList.js";
21
+ import "./isEmpty-ccacb5ff.js";
18
22
  import "./checkbox-ed6cc375.js";
19
23
  import "@floating-ui/react";
20
24
  import "./floatingUi-41f8c7b5.js";
@@ -59,7 +63,7 @@ const et = () => {
59
63
  "modal-footer": "_modal-footer_1mwne_12",
60
64
  "with-extra-node": "_with-extra-node_1mwne_19",
61
65
  "size-small": "_size-small_1mwne_23"
62
- }, f = x.bind(st), lt = ({
66
+ }, p = x.bind(st), lt = ({
63
67
  footerNode: e,
64
68
  closeHandler: o,
65
69
  okButton: n,
@@ -70,10 +74,10 @@ const et = () => {
70
74
  const l = /* @__PURE__ */ t(D, { adjustWidthOn: s === "small" ? "parent" : "min-width", ...r });
71
75
  return a ? /* @__PURE__ */ t(Q, { content: a, placement: "top", width: 270, children: l }) : l;
72
76
  };
73
- return /* @__PURE__ */ u("div", { className: f("modal-footer", { "with-extra-node": e, [`size-${s}`]: s }), children: [
77
+ return /* @__PURE__ */ u("div", { className: p("modal-footer", { "with-extra-node": e, [`size-${s}`]: s }), children: [
74
78
  e && e,
75
- /* @__PURE__ */ u("div", { className: f("buttons-block"), children: [
76
- c && /* @__PURE__ */ t("div", { className: f("button-container"), children: /* @__PURE__ */ t(
79
+ /* @__PURE__ */ u("div", { className: p("buttons-block"), children: [
80
+ c && /* @__PURE__ */ t("div", { className: p("button-container"), children: /* @__PURE__ */ t(
77
81
  D,
78
82
  {
79
83
  variant: "ghost",
@@ -82,7 +86,7 @@ const et = () => {
82
86
  ...c
83
87
  }
84
88
  ) }),
85
- n && /* @__PURE__ */ t("div", { className: f("button-container"), children: d() })
89
+ n && /* @__PURE__ */ t("div", { className: p("button-container"), children: d() })
86
90
  ] })
87
91
  ] });
88
92
  }, at = {
@@ -91,9 +95,9 @@ const et = () => {
91
95
  "modal-header-content": "_modal-header-content_w4aaf_14",
92
96
  "modal-title": "_modal-title_w4aaf_20",
93
97
  "close-modal-icon": "_close-modal-icon_w4aaf_29"
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, {}) })
98
+ }, f = x.bind(at), rt = ({ title: e, onClose: o, withDescription: n = !1 }) => /* @__PURE__ */ u("div", { className: f("modal-header", { "width-description": n }), children: [
99
+ /* @__PURE__ */ t("div", { className: f("modal-header-content"), children: e && /* @__PURE__ */ t("div", { className: f("modal-title"), children: e }) }),
100
+ /* @__PURE__ */ t(V, { className: f("close-modal-icon"), onClick: o, children: /* @__PURE__ */ t(Z, {}) })
97
101
  ] }), ct = "_modal_yxql5_1", dt = "_description_yxql5_43", mt = "_scrollable_yxql5_53", _t = {
98
102
  modal: ct,
99
103
  "overlay-default": "_overlay-default_yxql5_12",
@@ -105,7 +109,7 @@ const et = () => {
105
109
  "size-default": "_size-default_yxql5_57",
106
110
  "size-small": "_size-small_yxql5_69",
107
111
  "size-large": "_size-large_yxql5_81"
108
- }, g = x.bind(_t), ut = 0.9, ht = 32 + 24, wt = 32 + 8, ft = 36 + 16, pt = 32 * 2, $t = ({
112
+ }, g = x.bind(_t), ut = 0.9, ht = 32 + 24, wt = 32 + 8, pt = 36 + 16, ft = 32 * 2, Bt = ({
109
113
  title: e,
110
114
  children: o,
111
115
  footerNode: n,
@@ -124,8 +128,8 @@ const et = () => {
124
128
  description: m = null
125
129
  }) => {
126
130
  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;
131
+ let i = q - ft;
132
+ return O || (i = i - pt), m ? i = i - wt : i = i - ht, i;
129
133
  }, h = () => {
130
134
  N(!1);
131
135
  }, z = (i) => {
@@ -183,7 +187,7 @@ const et = () => {
183
187
  ) }) });
184
188
  };
185
189
  export {
186
- $t as Modal,
190
+ Bt as Modal,
187
191
  S as ModalContent,
188
192
  lt as ModalFooter,
189
193
  rt as ModalHeader
@@ -0,0 +1,160 @@
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import { c as I } from "./bind-06a7ff84.js";
3
+ import { useEffect as O, useCallback as x } from "react";
4
+ import { useDrag as S, useDrop as T, useDragLayer as h } from "react-dnd";
5
+ import { getEmptyImage as E } from "react-dnd-html5-backend";
6
+ import { createPortal as L } from "react-dom";
7
+ const D = "SORTABLE_ITEM", w = ({
8
+ id: e,
9
+ index: r,
10
+ type: s = D,
11
+ isDisabled: i = !1,
12
+ onDrop: l,
13
+ hideDefaultPreview: c = !1
14
+ }) => {
15
+ const [{ isDragging: d }, g, a] = S(
16
+ () => ({
17
+ type: s,
18
+ item: { id: e, index: r, type: s },
19
+ collect: (p) => ({
20
+ isDragging: p.isDragging()
21
+ }),
22
+ canDrag: () => !i
23
+ }),
24
+ [e, r, s, i]
25
+ );
26
+ O(() => {
27
+ c && a(E(), { captureDraggingState: !0 });
28
+ }, [c, a]);
29
+ const [{ isOver: o, draggedItemIndex: t }, n] = T(
30
+ () => ({
31
+ accept: s,
32
+ collect: (p) => {
33
+ const m = p.getItem(), b = (m == null ? void 0 : m.id) !== e ? p.isOver() : !1;
34
+ return {
35
+ isOver: b,
36
+ draggedItemIndex: b ? (m == null ? void 0 : m.index) ?? null : null
37
+ };
38
+ },
39
+ drop: (p) => {
40
+ p.id !== e && l && l(p.index, r);
41
+ }
42
+ }),
43
+ [e, r, s, l]
44
+ ), _ = (() => t === null ? null : t > r ? "top" : "bottom")();
45
+ return {
46
+ isDragging: d,
47
+ isOver: o,
48
+ draggedItemIndex: t,
49
+ dropPosition: _,
50
+ dragRef: g,
51
+ dropRef: n,
52
+ previewRef: a
53
+ };
54
+ }, P = {
55
+ "sortable-item": "_sortable-item_8p4ra_1",
56
+ "sortable-item--drop-target-top": "_sortable-item--drop-target-top_8p4ra_6",
57
+ "sortable-item--drop-target-bottom": "_sortable-item--drop-target-bottom_8p4ra_17",
58
+ "drag-handle": "_drag-handle_8p4ra_29",
59
+ "drag-handle--disabled": "_drag-handle--disabled_8p4ra_36"
60
+ }, C = I.bind(P), N = ({
61
+ id: e,
62
+ index: r,
63
+ type: s = D,
64
+ isDisabled: i = !1,
65
+ className: l,
66
+ draggingClassName: c,
67
+ dropTargetClassName: d,
68
+ onDrop: g,
69
+ hideDefaultPreview: a = !1,
70
+ children: o
71
+ }) => {
72
+ const { isDragging: t, dropPosition: n, dragRef: f, dropRef: _, previewRef: p } = w({
73
+ id: e,
74
+ index: r,
75
+ type: s,
76
+ isDisabled: i,
77
+ onDrop: g,
78
+ hideDefaultPreview: a
79
+ }), m = typeof o == "function", y = C("sortable-item", l, {
80
+ "sortable-item--dragging": t,
81
+ "sortable-item--drop-target-top": n === "top",
82
+ "sortable-item--drop-target-bottom": n === "bottom",
83
+ [c || ""]: t && c,
84
+ [d || ""]: n && d
85
+ });
86
+ return /* @__PURE__ */ u("div", { ref: (v) => {
87
+ _(v), a || p(v), m || f(v);
88
+ }, className: y, children: m ? o({
89
+ isDragging: t,
90
+ isOver: n !== null,
91
+ dragRef: f
92
+ }) : o });
93
+ }, W = ({
94
+ items: e,
95
+ type: r = D,
96
+ isDisabled: s = !1,
97
+ className: i,
98
+ itemClassName: l,
99
+ onReorder: c,
100
+ renderItem: d,
101
+ keyExtractor: g = (a) => a.id
102
+ }) => {
103
+ const a = x(
104
+ (o, t) => {
105
+ const n = [...e], [f] = n.splice(o, 1);
106
+ n.splice(t, 0, f), c(n);
107
+ },
108
+ [e, c]
109
+ );
110
+ return /* @__PURE__ */ u("div", { className: i, children: e.map((o, t) => /* @__PURE__ */ u(
111
+ N,
112
+ {
113
+ id: g(o),
114
+ index: t,
115
+ type: r,
116
+ isDisabled: s,
117
+ className: l,
118
+ onDrop: a,
119
+ children: ({ dragRef: n, isDragging: f }) => d(o, t, n, f)
120
+ },
121
+ g(o)
122
+ )) });
123
+ }, $ = (e) => {
124
+ if (!e)
125
+ return {
126
+ display: "none"
127
+ };
128
+ const { x: r, y: s } = e, i = `translate(${r}px, ${s}px)`;
129
+ return {
130
+ transform: i,
131
+ WebkitTransform: i
132
+ };
133
+ }, A = {
134
+ "drag-layer": "_drag-layer_1izcx_1",
135
+ "drag-preview": "_drag-preview_1izcx_11"
136
+ }, R = I.bind(A), Y = ({
137
+ type: e,
138
+ renderPreview: r,
139
+ className: s,
140
+ previewClassName: i,
141
+ portalTarget: l = document.body
142
+ }) => {
143
+ const { itemType: c, isDragging: d, item: g, clientOffset: a } = h(
144
+ (t) => ({
145
+ item: t.getItem(),
146
+ itemType: t.getItemType(),
147
+ clientOffset: t.getClientOffset(),
148
+ isDragging: t.isDragging()
149
+ })
150
+ );
151
+ if (!d || c !== e || !g || !l)
152
+ return null;
153
+ const o = /* @__PURE__ */ u("div", { className: R("drag-layer", s), children: /* @__PURE__ */ u("div", { className: R("drag-preview", i), style: $(a), children: r(g) }) });
154
+ return L(o, l);
155
+ };
156
+ export {
157
+ Y as DragLayer,
158
+ N as SortableItem,
159
+ W as SortableList
160
+ };