@reportportal/ui-kit 0.0.1-alpha.152 → 0.0.1-alpha.153

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/chip.js ADDED
@@ -0,0 +1,72 @@
1
+ import { jsxs as k, Fragment as w, jsx as n } from "react/jsx-runtime";
2
+ import { c as N } from "./bind-06a7ff84.js";
3
+ import "react";
4
+ import { S as x } from "./close-4d480ef7.js";
5
+ const D = "_chip_a59ru_16", j = "_clickable_a59ru_34", K = "_disabled_a59ru_40", S = "_label_a59ru_51", v = "_error_a59ru_82", E = "_warning_a59ru_87", F = "_link_a59ru_91", I = {
6
+ chip: D,
7
+ clickable: j,
8
+ disabled: K,
9
+ label: S,
10
+ "remove-button": "_remove-button_a59ru_57",
11
+ error: v,
12
+ warning: E,
13
+ link: F
14
+ }, c = N.bind(I), A = ({
15
+ children: u,
16
+ variant: b = "default",
17
+ link: s,
18
+ onClick: t,
19
+ onRemove: e,
20
+ className: p,
21
+ maxWidth: l,
22
+ title: f,
23
+ disabled: a = !1
24
+ }) => {
25
+ const o = !!t && !a, h = o ? "button" : void 0, m = o ? 0 : void 0, i = c("chip", b, p, {
26
+ disabled: a,
27
+ clickable: !!t || !!s,
28
+ removable: !!e
29
+ }), d = (r) => {
30
+ r.stopPropagation(), r.preventDefault(), e == null || e(r);
31
+ }, g = (r) => {
32
+ a || t == null || t(r);
33
+ }, y = (r) => {
34
+ a || (r.key === "Enter" || r.key === " ") && (r.preventDefault(), r.currentTarget.click());
35
+ }, _ = /* @__PURE__ */ k(w, { children: [
36
+ /* @__PURE__ */ n("span", { className: c("label"), style: l ? { maxWidth: l } : void 0, title: f, children: u }),
37
+ e && !a && /* @__PURE__ */ n(
38
+ "button",
39
+ {
40
+ type: "button",
41
+ className: c("remove-button"),
42
+ onClick: d,
43
+ "aria-label": "Remove",
44
+ children: /* @__PURE__ */ n(x, {})
45
+ }
46
+ )
47
+ ] });
48
+ return s && !a ? /* @__PURE__ */ n(
49
+ "a",
50
+ {
51
+ href: s,
52
+ className: i,
53
+ onClick: t,
54
+ target: "_blank",
55
+ rel: "noopener noreferrer",
56
+ children: _
57
+ }
58
+ ) : /* @__PURE__ */ n(
59
+ "span",
60
+ {
61
+ className: i,
62
+ onClick: g,
63
+ onKeyDown: y,
64
+ role: h,
65
+ tabIndex: m,
66
+ children: _
67
+ }
68
+ );
69
+ };
70
+ export {
71
+ A as Chip
72
+ };
@@ -0,0 +1,15 @@
1
+ import { ReactNode, MouseEvent } from 'react';
2
+
3
+ export type ChipVariant = 'default' | 'error' | 'warning' | 'link';
4
+ export interface ChipProps {
5
+ children: ReactNode;
6
+ variant?: ChipVariant;
7
+ link?: string;
8
+ onClick?: (event: MouseEvent<HTMLElement>) => void;
9
+ onRemove?: (event: MouseEvent<HTMLButtonElement>) => void;
10
+ className?: string;
11
+ maxWidth?: number;
12
+ title?: string;
13
+ disabled?: boolean;
14
+ }
15
+ export declare const Chip: ({ children, variant, link, onClick, onRemove, className, maxWidth, title, disabled, }: ChipProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Chip } from './chip';
2
+ export type { ChipProps, ChipVariant } from './chip';
@@ -5,6 +5,7 @@ export { Breadcrumbs } from './breadcrumbs';
5
5
  export { BubblesLoader } from './bubblesLoader';
6
6
  export { Button } from './button';
7
7
  export { Checkbox } from './checkbox';
8
+ export { Chip } from './chip';
8
9
  export { DatePicker } from './datePicker';
9
10
  export { Dropdown } from './dropdown';
10
11
  export { FieldLabel } from './fieldLabel';
@@ -13,6 +14,7 @@ export { FieldText } from './fieldText';
13
14
  export { FieldTextFlex } from './fieldTextFlex';
14
15
  export { FileDropArea } from './fileDropArea';
15
16
  export { FiltersButton } from './filtersButton';
17
+ export { IssueList } from './issueList';
16
18
  export { Modal } from './modal';
17
19
  export { MultipleAutocomplete } from './autocompletes/multipleAutocomplete';
18
20
  export { Pagination } from './pagination';
@@ -0,0 +1,5 @@
1
+ export declare const FONT_LOADING_DELAY = 100;
2
+ export declare const GAP = 8;
3
+ export declare const MIN_COUNTER_WIDTH = 32;
4
+ export declare const MIN_ISSUE_WIDTH = 60;
5
+ export declare const TOOLTIP_WIDTH = 360;
@@ -0,0 +1,2 @@
1
+ export { IssueList } from './issueList';
2
+ export type { IssueListProps, Issue } from './issueList';
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ export interface Issue {
4
+ key: string;
5
+ name: string;
6
+ link?: string;
7
+ }
8
+ export interface IssueListProps {
9
+ issues: Issue[];
10
+ isExpanded?: boolean;
11
+ onIssueClick?: (issue: Issue) => void;
12
+ onIssueRemove?: (issue: Issue) => void;
13
+ onCounterClick?: () => void;
14
+ renderTooltip?: (issue: Issue) => ReactNode;
15
+ tooltipPortalRoot?: Element;
16
+ className?: string;
17
+ }
18
+ export declare const IssueList: ({ issues, isExpanded, onIssueClick, onIssueRemove, onCounterClick, renderTooltip, tooltipPortalRoot, className, }: IssueListProps) => import("react/jsx-runtime").JSX.Element | null;
package/dist/index.js CHANGED
@@ -1,48 +1,50 @@
1
1
  import { AdaptiveTagList as D } from "./adaptiveTagList.js";
2
2
  import { A as y } from "./index-1a874a8b.js";
3
- import { B as A } from "./baseIconButton-251479f7.js";
4
- import { B as h } from "./breadcrumbs-8e5ca8d7.js";
3
+ import { B as h } from "./baseIconButton-251479f7.js";
4
+ import { B } from "./breadcrumbs-8e5ca8d7.js";
5
5
  import { B as M } from "./bubblesLoader-f3ffa240.js";
6
- import { B as L } from "./button-97d9e587.js";
6
+ import { B as w } from "./button-97d9e587.js";
7
7
  import { C as k } from "./checkbox-ed6cc375.js";
8
- import { D as O } from "./datePicker-3881a2d6.js";
8
+ import { Chip as O } from "./chip.js";
9
+ import { D as z } from "./datePicker-3881a2d6.js";
9
10
  import "react-datepicker";
10
- import { D as z } from "./dropdown-b63f2137.js";
11
- import { FieldLabel as J } from "./fieldLabel.js";
12
- import { F as G } from "./fieldNumber-d1b5a7a1.js";
13
- import { F as X } from "./fieldText-1749da7a.js";
14
- import { F as q } from "./fieldTextFlex-2f51c173.js";
15
- import { FileDropArea as Q } from "./fileDropArea.js";
16
- import { FiltersButton as Y } from "./filtersButton.js";
17
- import { Modal as _ } from "./modal.js";
18
- import { MultipleAutocomplete as oo, SingleAutocomplete as ro } from "./autocompletes.js";
19
- import { P as to } from "./pagination-a3dee614.js";
20
- import { Popover as no } from "./popover.js";
21
- import { R as po } from "./radio-62546efa.js";
22
- import { S as mo } from "./selection-9124d029.js";
23
- import { S as Io } from "./spinLoader-c4a53718.js";
24
- import { SystemAlert as xo } from "./systemAlert.js";
25
- import { S as uo } from "./systemMessage-924fdaa6.js";
26
- import { DragLayer as Po, SortableItem as Co, SortableList as go } from "./sortable.js";
27
- import { T as Do } from "./table-2c659767.js";
28
- import { T as yo } from "./themeProvider-46c2be7b.js";
29
- import { T as Ao } from "./toggle-304107fa.js";
30
- import { Tooltip as ho } from "./tooltip.js";
31
- import { SidePanel as Mo } from "./sidePanel.js";
32
- import { AddCsvIcon as Lo, AddImageIcon as Ro, AddJarIcon as ko, BreadcrumbsTreeIcon as Eo, CalendarIcon as Oo, CheckmarkIcon as Uo, ChevronRightBreadcrumbsIcon as zo, ConfigurationIcon as Ho, CopyIcon as Jo, CoverageFullIcon as No, CoveragePartialIcon as Go, CoveredManuallyIcon as Wo, DeleteIcon as Xo, DragAndDropIcon as jo, DragNDropIcon as qo, DurationIcon as Ko, EditIcon as Qo, ExportIcon as Vo, FlagIcon as Yo, GroupByIcon as Zo, HideIcon as _o, LaunchTypeIcon as $o, MaximizeIcon as or, MoveToFolderIcon as rr, PinFilledIcon as er, PinOutlineIcon as tr, PriorityBlockerIcon as ar, PriorityCriticalIcon as nr, PriorityHighIcon as cr, PriorityLowIcon as pr, PriorityMediumIcon as ir, PriorityUnspecifiedIcon as mr, RefreshIcon as sr, RerunIcon as Ir, RunManualIcon as lr, SearchIcon as xr, SortIcon as fr, StatusSuccessIcon as dr, TestPlanIcon as ur, UserIcon as Sr, WarningIcon as Pr } from "./icons.js";
33
- import { S as gr, a as Fr, b as Dr, c as br } from "./resizeColumn-d4107941.js";
34
- import { S as Tr } from "./calendarArrow-44c7e60e.js";
35
- import { S as Br } from "./clear-53660571.js";
36
- import { S as vr, a as Mr } from "./openEye-950159cb.js";
37
- import { S as Lr } from "./close-4d480ef7.js";
38
- import { S as kr, a as Er, b as Or, c as Ur, d as zr, e as Hr, f as Jr } from "./xls-995781cc.js";
39
- import { S as Gr } from "./dropdown-0260bb66.js";
40
- import { S as Xr, a as jr, b as qr } from "./success-8fd8bd2c.js";
41
- import { S as Qr, a as Vr } from "./filterOutline-819b4b0d.js";
42
- import { S as Zr, a as _r } from "./tree-c3dd3d45.js";
43
- import { S as oe } from "./minus-2857540f.js";
44
- import { S as ee } from "./plus-199fb2a8.js";
45
- import { S as ae, a as ne } from "./prevPage-87faf576.js";
11
+ import { D as J } from "./dropdown-b63f2137.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-65ae1c11.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";
46
48
  import "react/jsx-runtime";
47
49
  import "react";
48
50
  import "./bind-06a7ff84.js";
@@ -64,105 +66,107 @@ import "./common.js";
64
66
  import "react-resizable";
65
67
  export {
66
68
  D as AdaptiveTagList,
67
- Lo as AddCsvIcon,
68
- Ro as AddImageIcon,
69
- ko as AddJarIcon,
70
- gr as ArrowDownIcon,
71
- Fr as ArrowUpIcon,
69
+ Oo as AddCsvIcon,
70
+ Uo as AddImageIcon,
71
+ zo as AddJarIcon,
72
+ yr as ArrowDownIcon,
73
+ Tr as ArrowUpIcon,
72
74
  y as AttachedFile,
73
- A as BaseIconButton,
74
- h as Breadcrumbs,
75
- Eo as BreadcrumbsTreeIcon,
75
+ h as BaseIconButton,
76
+ B as Breadcrumbs,
77
+ Ho as BreadcrumbsTreeIcon,
76
78
  M as BubblesLoader,
77
- L as Button,
78
- Tr as CalendarArrowIcon,
79
- Oo as CalendarIcon,
79
+ w as Button,
80
+ vr as CalendarArrowIcon,
81
+ Jo as CalendarIcon,
80
82
  k as Checkbox,
81
- Uo as CheckmarkIcon,
82
- Dr as ChevronDownDropdownIcon,
83
- zo as ChevronRightBreadcrumbsIcon,
84
- Br as ClearIcon,
85
- vr as CloseEyeIcon,
86
- Lr as CloseIcon,
87
- Ho as ConfigurationIcon,
88
- Jo as CopyIcon,
89
- No as CoverageFullIcon,
90
- Go as CoveragePartialIcon,
91
- Wo as CoveredManuallyIcon,
92
- kr as CsvIcon,
93
- O as DatePicker,
94
- Xo as DeleteIcon,
95
- jo as DragAndDropIcon,
96
- Po as DragLayer,
97
- qo as DragNDropIcon,
98
- z as Dropdown,
99
- Gr as DropdownIcon,
100
- Ko as DurationIcon,
101
- Qo as EditIcon,
102
- Xr as ErrorIcon,
103
- Vo as ExportIcon,
104
- Er as ExternalLinkIcon,
105
- J as FieldLabel,
106
- G as FieldNumber,
107
- X as FieldText,
108
- q as FieldTextFlex,
109
- Q as FileDropArea,
110
- Or as FileOtherIcon,
111
- Qr as FilterFilledIcon,
112
- Vr as FilterOutlineIcon,
113
- Y as FiltersButton,
114
- Yo as FlagIcon,
115
- Zo as GroupByIcon,
116
- _o as HideIcon,
117
- Ur as ImageIcon,
118
- jr as InfoIcon,
119
- zr as JarIcon,
120
- $o as LaunchTypeIcon,
121
- or as MaximizeIcon,
122
- Zr as MeatballMenuIcon,
123
- oe as MinusIcon,
124
- _ as Modal,
125
- rr as MoveToFolderIcon,
126
- oo as MultipleAutocomplete,
127
- Mr as OpenEyeIcon,
128
- to as Pagination,
129
- Hr as PdfIcon,
130
- er as PinFilledIcon,
131
- tr as PinOutlineIcon,
132
- ee as PlusIcon,
133
- no as Popover,
134
- ae as PrevChapterIcon,
135
- ne as PrevPageIcon,
136
- ar as PriorityBlockerIcon,
137
- nr as PriorityCriticalIcon,
138
- cr as PriorityHighIcon,
139
- pr as PriorityLowIcon,
140
- ir as PriorityMediumIcon,
141
- mr as PriorityUnspecifiedIcon,
142
- po as Radio,
143
- sr as RefreshIcon,
144
- Ir as RerunIcon,
145
- br as ResizeColumnIcon,
146
- lr as RunManualIcon,
147
- xr as SearchIcon,
148
- mo as Selection,
149
- Mo as SidePanel,
150
- ro as SingleAutocomplete,
151
- fr as SortIcon,
152
- Co as SortableItem,
153
- go as SortableList,
154
- Io as SpinLoader,
155
- dr as StatusSuccessIcon,
156
- qr as SuccessIcon,
157
- xo as SystemAlert,
158
- uo as SystemMessage,
159
- Do as Table,
160
- ur as TestPlanIcon,
161
- yo as ThemeProvider,
162
- Ao as Toggle,
163
- ho as Tooltip,
164
- _r as TreeIcon,
165
- Sr as UserIcon,
166
- Pr as WarningIcon,
167
- Jr as XlsIcon
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
168
172
  };
@@ -0,0 +1,125 @@
1
+ import { jsxs as H, jsx as y } from "react/jsx-runtime";
2
+ import { useRef as v, useState as E, useCallback as N, useEffect as I } from "react";
3
+ import { c as q } from "./bind-06a7ff84.js";
4
+ import { Chip as F } from "./chip.js";
5
+ import { Tooltip as B } from "./tooltip.js";
6
+ import { i as J } from "./isEmpty-ccacb5ff.js";
7
+ import "./close-4d480ef7.js";
8
+ import "react-dom";
9
+ import "@floating-ui/react";
10
+ import "./floatingUi-41f8c7b5.js";
11
+ const K = 100, R = 8, Q = 32, X = 60, Z = 360, $ = "_expanded_ypfdt_25", C = "_issue_ypfdt_16", tt = "_counter_ypfdt_36", et = "_hidden_ypfdt_55", nt = "_ellipsis_ypfdt_61", rt = {
12
+ "issue-list": "_issue-list_ypfdt_16",
13
+ expanded: $,
14
+ issue: C,
15
+ "counter-wrapper": "_counter-wrapper_ypfdt_36",
16
+ counter: tt,
17
+ "tooltip-wrapper": "_tooltip-wrapper_ypfdt_50",
18
+ hidden: et,
19
+ ellipsis: nt
20
+ }, a = q.bind(rt), ht = ({
21
+ issues: n,
22
+ isExpanded: W = !1,
23
+ onIssueClick: i,
24
+ onIssueRemove: T,
25
+ onCounterClick: d,
26
+ renderTooltip: L,
27
+ tooltipPortalRoot: S,
28
+ className: j
29
+ }) => {
30
+ const p = v(null), x = v(null), O = v(/* @__PURE__ */ new Map()), D = v(/* @__PURE__ */ new Map()), [M, c] = E(n.length), [o, k] = E(W), [w, l] = E(!1), z = N((t, r) => {
31
+ r && O.current.set(t, r);
32
+ }, []), f = N(() => {
33
+ var _;
34
+ const t = p.current;
35
+ if (!t || n.length === 0)
36
+ return;
37
+ const r = t.offsetWidth, u = ((_ = x.current) == null ? void 0 : _.offsetWidth) || Q, h = n.map((e, m) => {
38
+ const g = O.current.get(e.key);
39
+ if (!g)
40
+ return 0;
41
+ const s = g.offsetWidth;
42
+ return m === 0 && w ? D.current.get(e.key) || s : (D.current.set(e.key, s), s);
43
+ });
44
+ if (h.reduce((e, m) => e + m, 0) + (n.length - 1) * R <= r) {
45
+ l(!1), c(n.length);
46
+ return;
47
+ }
48
+ for (let e = n.length - 1; e >= 1; e--) {
49
+ if (h.slice(0, e).reduce((s, Y) => s + Y, 0) + e * R + u <= r) {
50
+ c(e), l(!1);
51
+ return;
52
+ }
53
+ if (e === 1) {
54
+ r - R - u <= X ? (c(0), l(!1)) : (c(1), l(!0));
55
+ return;
56
+ }
57
+ }
58
+ }, [n, w]);
59
+ I(() => {
60
+ k(W);
61
+ }, [W]), I(() => {
62
+ if (o)
63
+ return;
64
+ const t = setTimeout(f, K);
65
+ return () => clearTimeout(t);
66
+ }, [f, n, o]), I(() => {
67
+ if (o)
68
+ return;
69
+ const t = new ResizeObserver(() => {
70
+ f();
71
+ });
72
+ return p.current && t.observe(p.current), () => t.disconnect();
73
+ }, [f, o]);
74
+ const G = N(() => {
75
+ k(!0), c(n.length), l(!1), d == null || d();
76
+ }, [n.length, d]), P = N(
77
+ (t) => {
78
+ i == null || i(t);
79
+ },
80
+ [i]
81
+ );
82
+ if (J(n))
83
+ return null;
84
+ const A = n.length - M, U = A > 0 && !o, V = (t, r) => {
85
+ const u = !o && r >= M, h = !o && r === 0 && w, b = /* @__PURE__ */ y(
86
+ F,
87
+ {
88
+ variant: "link",
89
+ link: t.link,
90
+ onClick: i ? () => P(t) : void 0,
91
+ onRemove: T ? () => T(t) : void 0,
92
+ children: t.name
93
+ }
94
+ ), _ = L ? /* @__PURE__ */ y(
95
+ B,
96
+ {
97
+ content: L(t),
98
+ width: Z,
99
+ portalRoot: S,
100
+ wrapperClassName: a("tooltip-wrapper"),
101
+ placement: "top",
102
+ children: b
103
+ }
104
+ ) : b;
105
+ return /* @__PURE__ */ y(
106
+ "div",
107
+ {
108
+ ref: (e) => z(t.key, e),
109
+ className: a("issue", { hidden: u, ellipsis: h }),
110
+ children: _
111
+ },
112
+ t.key
113
+ );
114
+ };
115
+ return /* @__PURE__ */ H("div", { ref: p, className: a("issue-list", j, { expanded: o }), children: [
116
+ n.map((t, r) => V(t, r)),
117
+ /* @__PURE__ */ y("div", { ref: x, className: a("counter-wrapper", { hidden: !U }), children: /* @__PURE__ */ H(F, { className: a("counter"), variant: "link", onClick: G, children: [
118
+ "+",
119
+ A
120
+ ] }) })
121
+ ] });
122
+ };
123
+ export {
124
+ ht as IssueList
125
+ };