@reportportal/ui-kit 0.0.1-alpha.151 → 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 +72 -0
- package/dist/components/chip/chip.d.ts +15 -0
- package/dist/components/chip/index.d.ts +2 -0
- package/dist/components/dropdown/dropdown.d.ts +0 -4
- package/dist/components/index.d.ts +2 -0
- package/dist/components/issueList/constants.d.ts +5 -0
- package/dist/components/issueList/index.d.ts +2 -0
- package/dist/components/issueList/issueList.d.ts +18 -0
- package/dist/components/table/constants.d.ts +1 -0
- package/dist/components/table/gradientOverlay/gradientOverlay.d.ts +19 -0
- package/dist/components/table/gradientOverlay/index.d.ts +2 -0
- package/dist/components/table/hooks/index.d.ts +2 -0
- package/dist/components/table/hooks/useGradientPosition.d.ts +24 -0
- package/dist/components/table/types.d.ts +5 -1
- package/dist/{datePicker-d85ff750.js → datePicker-3881a2d6.js} +1 -1
- package/dist/datePicker.js +4 -7
- package/dist/{dropdown-86a51ac5.js → dropdown-b63f2137.js} +200 -213
- package/dist/dropdown.js +3 -6
- package/dist/index.js +142 -138
- package/dist/issueList.js +125 -0
- package/dist/modal.js +1 -1
- package/dist/style.css +1 -1
- package/dist/table-65ae1c11.js +936 -0
- package/dist/table.js +1 -1
- package/package.json +1 -1
- package/dist/table-82d5455c.js +0 -597
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;
|
|
@@ -40,10 +40,6 @@ export interface DropdownProps {
|
|
|
40
40
|
onClear?: () => void;
|
|
41
41
|
/** ARIA label for the clear button */
|
|
42
42
|
clearButtonAriaLabel?: string;
|
|
43
|
-
/** Portal root element for tooltip rendering (e.g., document.body to prevent clipping) */
|
|
44
|
-
tooltipPortalRoot?: Element;
|
|
45
|
-
/** Z-index for tooltip when rendered in portal (default: 9) */
|
|
46
|
-
tooltipZIndex?: number;
|
|
47
43
|
/**
|
|
48
44
|
* Portal root element for dropdown menu rendering.
|
|
49
45
|
* When provided, the menu will be rendered in this element using React Portal.
|
|
@@ -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,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;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface GradientOverlayProps {
|
|
4
|
+
portalContainer?: HTMLElement | null;
|
|
5
|
+
visible: boolean;
|
|
6
|
+
position: {
|
|
7
|
+
top: number;
|
|
8
|
+
left?: number;
|
|
9
|
+
right?: number;
|
|
10
|
+
};
|
|
11
|
+
size: {
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
};
|
|
15
|
+
direction: 'left' | 'right';
|
|
16
|
+
className?: string;
|
|
17
|
+
dataTestId?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const GradientOverlay: ({ portalContainer, visible, position, size, direction, className, dataTestId, }: GradientOverlayProps) => ReactElement | null;
|
|
@@ -3,3 +3,5 @@ export { useTableHover } from './useTableHover';
|
|
|
3
3
|
export { useTableExpansion } from './useTableExpansion';
|
|
4
4
|
export { useColumnWidths } from './useColumnWidths';
|
|
5
5
|
export { useColumnResize } from './useColumnResize';
|
|
6
|
+
export { useRightGradientPosition, usePinnedGradientPosition } from './useGradientPosition';
|
|
7
|
+
export type { RightGradientPosition, PinnedGradientPosition } from './useGradientPosition';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface RightGradientPosition {
|
|
2
|
+
visible: boolean;
|
|
3
|
+
position: {
|
|
4
|
+
top: number;
|
|
5
|
+
left: number;
|
|
6
|
+
};
|
|
7
|
+
size: {
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export interface PinnedGradientPosition {
|
|
13
|
+
visible: boolean;
|
|
14
|
+
position: {
|
|
15
|
+
top: number;
|
|
16
|
+
left: number;
|
|
17
|
+
};
|
|
18
|
+
size: {
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export declare const useRightGradientPosition: (table: HTMLElement | null, header: HTMLElement | null, scrollContainer: HTMLElement | null, isHeaderPinned: boolean, scrollLeft: number, scrollTop: number, tableScrollWidth: number, windowResizeCounter: number) => RightGradientPosition;
|
|
24
|
+
export declare const usePinnedGradientPosition: (table: HTMLElement | null, scrollLeft: number, header: HTMLElement | null, scrollContainer: HTMLElement | null, isHeaderPinned: boolean, scrollTop: number, tableScrollWidth: number, windowResizeCounter: number) => PinnedGradientPosition;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dispatch, ReactNode, SetStateAction } from 'react';
|
|
1
|
+
import { Dispatch, ReactNode, RefObject, SetStateAction } from 'react';
|
|
2
2
|
import { ASC, DESC } from './constants';
|
|
3
3
|
|
|
4
4
|
export interface Column {
|
|
@@ -70,4 +70,8 @@ export interface TableComponentProps {
|
|
|
70
70
|
onToggleRowExpansion?: (id: string | number) => void;
|
|
71
71
|
onToggleAllRowsExpansion?: () => void;
|
|
72
72
|
onColumnResize?: (columnKey: string, width: number) => void;
|
|
73
|
+
externalScrollContainerRef?: RefObject<HTMLElement> | RefObject<Element> | null | undefined;
|
|
74
|
+
portalContainer?: HTMLElement | null;
|
|
75
|
+
rightGradientClassName?: string;
|
|
76
|
+
pinnedGradientClassName?: string;
|
|
73
77
|
}
|
|
@@ -3,7 +3,7 @@ import B from "react-datepicker/dist/es/index.js";
|
|
|
3
3
|
import { c as R } from "./bind-06a7ff84.js";
|
|
4
4
|
import { useMemo as P, useRef as D } from "react";
|
|
5
5
|
import { F as I } from "./fieldText-1749da7a.js";
|
|
6
|
-
import { D as E } from "./dropdown-
|
|
6
|
+
import { D as E } from "./dropdown-b63f2137.js";
|
|
7
7
|
import { S as T } from "./calendarArrow-44c7e60e.js";
|
|
8
8
|
import { registerLocale as j } from "react-datepicker";
|
|
9
9
|
const ie = (n, s) => {
|
package/dist/datePicker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as t } from "./datePicker-
|
|
2
|
-
import { r as
|
|
1
|
+
import { D as t } from "./datePicker-3881a2d6.js";
|
|
2
|
+
import { r as A } from "./datePicker-3881a2d6.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react-datepicker/dist/es/index.js";
|
|
5
5
|
import "./bind-06a7ff84.js";
|
|
@@ -11,16 +11,13 @@ import "./baseIconButton-251479f7.js";
|
|
|
11
11
|
import "./spinLoader-c4a53718.js";
|
|
12
12
|
import "./maxValueDisplay-9be01a75.js";
|
|
13
13
|
import "./fieldLabel.js";
|
|
14
|
-
import "./dropdown-
|
|
14
|
+
import "./dropdown-b63f2137.js";
|
|
15
15
|
import "react-dom";
|
|
16
16
|
import "@floating-ui/react-dom";
|
|
17
17
|
import "downshift";
|
|
18
18
|
import "rc-scrollbars";
|
|
19
19
|
import "./keyCodes-f63c0e11.js";
|
|
20
20
|
import "./dropdown-0260bb66.js";
|
|
21
|
-
import "./tooltip.js";
|
|
22
|
-
import "@floating-ui/react";
|
|
23
|
-
import "./floatingUi-41f8c7b5.js";
|
|
24
21
|
import "./adaptiveTagList.js";
|
|
25
22
|
import "./button-97d9e587.js";
|
|
26
23
|
import "./close-4d480ef7.js";
|
|
@@ -31,5 +28,5 @@ import "react-datepicker";
|
|
|
31
28
|
export {
|
|
32
29
|
t as DatePicker,
|
|
33
30
|
t as default,
|
|
34
|
-
|
|
31
|
+
A as registerDatePickerLocale
|
|
35
32
|
};
|