@reportportal/ui-kit 0.0.1-alpha.184 → 0.0.1-alpha.186

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.
@@ -0,0 +1,73 @@
1
+ import { jsxs as x, jsx as n } from "react/jsx-runtime";
2
+ import { c as f } from "./bind-06a7ff84.js";
3
+ import { useRef as y, useId as C } from "react";
4
+ import { K as p } from "./keyCodes-f63c0e11.js";
5
+ const E = "_checkbox_6sak0_1", D = "_disabled_6sak0_12", K = "_input_6sak0_17", N = "_control_6sak0_24", I = "_children_6sak0_152", R = {
6
+ checkbox: E,
7
+ disabled: D,
8
+ input: K,
9
+ control: N,
10
+ "partially-checked": "_partially-checked_6sak0_79",
11
+ children: I
12
+ }, e = f.bind(R), A = ({
13
+ children: a,
14
+ disabled: c = !1,
15
+ onChange: d,
16
+ className: h,
17
+ value: t,
18
+ partiallyChecked: b,
19
+ title: r,
20
+ ...u
21
+ }) => {
22
+ const o = y(null), l = C(), m = (s) => {
23
+ var k, _;
24
+ const { keyCode: i } = s;
25
+ if (i === p.SPACE_KEY_CODE) {
26
+ s.preventDefault(), (k = o.current) == null || k.click();
27
+ return;
28
+ }
29
+ i === p.ENTER_KEY_CODE && (s.preventDefault(), (_ = o.current) == null || _.click());
30
+ };
31
+ return /* @__PURE__ */ x(
32
+ "label",
33
+ {
34
+ id: l,
35
+ className: e("checkbox", h, {
36
+ disabled: c
37
+ }),
38
+ title: r,
39
+ children: [
40
+ /* @__PURE__ */ n(
41
+ "input",
42
+ {
43
+ ref: o,
44
+ tabIndex: 0,
45
+ type: "checkbox",
46
+ onKeyDown: m,
47
+ className: e("input", { "partially-checked": b }),
48
+ disabled: c,
49
+ onChange: d,
50
+ checked: t,
51
+ title: r,
52
+ ...u
53
+ }
54
+ ),
55
+ /* @__PURE__ */ n(
56
+ "span",
57
+ {
58
+ "aria-labelledby": l,
59
+ role: "checkbox",
60
+ "aria-checked": t,
61
+ className: e("control", {
62
+ disabled: c
63
+ })
64
+ }
65
+ ),
66
+ a && /* @__PURE__ */ n("span", { className: e("children", { disabled: c }), children: a })
67
+ ]
68
+ }
69
+ );
70
+ };
71
+ export {
72
+ A as C
73
+ };
package/dist/checkbox.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as r } from "./checkbox-b85cd9fa.js";
1
+ import { C as r } from "./checkbox-2b9f889c.js";
2
2
  import "react/jsx-runtime";
3
3
  import "./bind-06a7ff84.js";
4
4
  import "react";
@@ -1 +1,2 @@
1
1
  export declare const DEFAULT_SORTABLE_TYPE = "SORTABLE_ITEM";
2
+ export declare const EXTERNAL_TREE_DROP_TYPE = "EXTERNAL_TREE_DROP";
@@ -1,3 +1,3 @@
1
1
  import { UseTreeSortableOptions, UseTreeSortableReturn } from '../types';
2
2
 
3
- export declare const useTreeSortable: ({ id, index, parentId, type, isDisabled, acceptDrop, isLast, canDropOn, onDrop, hideDefaultPreview, }: UseTreeSortableOptions) => UseTreeSortableReturn;
3
+ export declare const useTreeSortable: ({ id, index, parentId, type, isDisabled, acceptDrop, isLast, canDropOn, onDrop, hideDefaultPreview, acceptExternalDrop, externalDropType, }: UseTreeSortableOptions) => UseTreeSortableReturn;
@@ -1,5 +1,5 @@
1
1
  import { u as E } from "../useOnClickOutside-8f7d68a1.js";
2
- import { u as A, a as R } from "../useTreeSortable-687d8f74.js";
2
+ import { u as A, a as R } from "../useTreeSortable-bc631689.js";
3
3
  import { useCallback as D } from "react";
4
4
  import { i as x } from "../isEmpty-ccacb5ff.js";
5
5
  import { u as W } from "../useWindowResize-a7e1ac92.js";
@@ -101,6 +101,7 @@ export type TreeDropPosition = TreeDropPositionValue | null;
101
101
  export interface TreeDragItem extends DragItem {
102
102
  parentId?: string | number | null;
103
103
  depth?: number;
104
+ isExternal?: boolean;
104
105
  }
105
106
  export type TreeDropHandler = (draggedItem: TreeDragItem, targetId: string | number, position: TreeDropPosition) => void;
106
107
  export interface UseTreeSortableOptions {
@@ -114,6 +115,8 @@ export interface UseTreeSortableOptions {
114
115
  canDropOn?: (draggedItem: TreeDragItem, targetId: string | number) => boolean;
115
116
  onDrop?: TreeDropHandler;
116
117
  hideDefaultPreview?: boolean;
118
+ acceptExternalDrop?: boolean;
119
+ externalDropType?: string;
117
120
  }
118
121
  export interface TreeSortableState {
119
122
  isDragging: boolean;
@@ -136,6 +139,8 @@ export interface TreeSortableItemProps {
136
139
  acceptDrop?: boolean;
137
140
  isLast?: boolean;
138
141
  canDropOn?: (draggedItem: TreeDragItem, targetId: string | number) => boolean;
142
+ acceptExternalDrop?: boolean;
143
+ externalDropType?: string;
139
144
  className?: string;
140
145
  style?: CSSProperties;
141
146
  draggingClassName?: string;
@@ -174,5 +179,7 @@ export interface TreeSortableContainerProps {
174
179
  portalTarget?: Element | null;
175
180
  onMove?: TreeDropHandler;
176
181
  onDuplicate?: TreeDropHandler;
182
+ onMoveExternal?: TreeDropHandler;
183
+ onDuplicateExternal?: TreeDropHandler;
177
184
  onCancel?: () => void;
178
185
  }
@@ -1,3 +1,3 @@
1
1
  import { TreeSortableContainerProps } from '../../../common/types';
2
2
 
3
- export declare const TreeSortableContainer: ({ children, showDropConfirmation, confirmationLabels, portalTarget, onMove, onDuplicate, onCancel, }: TreeSortableContainerProps) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const TreeSortableContainer: ({ children, showDropConfirmation, confirmationLabels, portalTarget, onMove, onDuplicate, onMoveExternal, onDuplicateExternal, onCancel, }: TreeSortableContainerProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import { TreeSortableItemProps } from '../../../common/types';
2
2
 
3
- export declare const TreeSortableItem: ({ id, index, parentId, type, isDisabled, acceptDrop, isLast, canDropOn, className, style, draggingClassName, dropBeforeClassName, dropInsideClassName, dropAfterClassName, onDrop, hideDefaultPreview, children, }: TreeSortableItemProps) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const TreeSortableItem: ({ id, index, parentId, type, isDisabled, acceptDrop, isLast, canDropOn, acceptExternalDrop, externalDropType, className, style, draggingClassName, dropBeforeClassName, dropInsideClassName, dropAfterClassName, onDrop, hideDefaultPreview, children, }: TreeSortableItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,7 @@ import { useMemo as E, forwardRef as G, useRef as V } from "react";
3
3
  import v from "react-datepicker/dist/es/index.js";
4
4
  import { c as L } from "./bind-06a7ff84.js";
5
5
  import { F as W } from "./fieldText-1749da7a.js";
6
- import { D as x } from "./dropdown-27dfefb1.js";
6
+ import { D as x } from "./dropdown-99d0749c.js";
7
7
  import { S as I } from "./calendarArrow-44c7e60e.js";
8
8
  import { registerLocale as q } from "react-datepicker";
9
9
  const De = (t, n) => {
@@ -1,5 +1,5 @@
1
- import { D as t } from "./datePicker-18882a46.js";
2
- import { r as E } from "./datePicker-18882a46.js";
1
+ import { D as t } from "./datePicker-8453b46f.js";
2
+ import { r as E } from "./datePicker-8453b46f.js";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "react-datepicker/dist/es/index.js";
@@ -11,7 +11,7 @@ import "./baseIconButton-251479f7.js";
11
11
  import "./spinLoader-c4a53718.js";
12
12
  import "./maxValueDisplay-9be01a75.js";
13
13
  import "./fieldLabel.js";
14
- import "./dropdown-27dfefb1.js";
14
+ import "./dropdown-99d0749c.js";
15
15
  import "react-dom";
16
16
  import "@floating-ui/react-dom";
17
17
  import "downshift";
@@ -25,7 +25,7 @@ import "./isEmpty-ccacb5ff.js";
25
25
  import "react-dnd";
26
26
  import "react-dnd-html5-backend";
27
27
  import "./useEllipsisTitle-462fa254.js";
28
- import "./checkbox-b85cd9fa.js";
28
+ import "./checkbox-2b9f889c.js";
29
29
  import "./calendarArrow-44c7e60e.js";
30
30
  import "react-datepicker";
31
31
  export {
@@ -14,7 +14,7 @@ import { AdaptiveTagList as zr } from "./adaptiveTagList.js";
14
14
  import "react-dnd";
15
15
  import "react-dnd-html5-backend";
16
16
  import { u as Tr } from "./useEllipsisTitle-462fa254.js";
17
- import { C as xr } from "./checkbox-b85cd9fa.js";
17
+ import { C as xr } from "./checkbox-2b9f889c.js";
18
18
  import { i as te } from "./isEmpty-ccacb5ff.js";
19
19
  const kr = (n) => {
20
20
  const r = {}, c = {};
package/dist/dropdown.js CHANGED
@@ -1,5 +1,5 @@
1
- import { D as r } from "./dropdown-27dfefb1.js";
2
- import { a as E } from "./dropdown-27dfefb1.js";
1
+ import { D as r } from "./dropdown-99d0749c.js";
2
+ import { a as E } from "./dropdown-99d0749c.js";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "react-dom";
@@ -19,7 +19,7 @@ import "./isEmpty-ccacb5ff.js";
19
19
  import "react-dnd";
20
20
  import "react-dnd-html5-backend";
21
21
  import "./useEllipsisTitle-462fa254.js";
22
- import "./checkbox-b85cd9fa.js";
22
+ import "./checkbox-2b9f889c.js";
23
23
  export {
24
24
  E as DROPDOWN_PORTAL_MENU_ATTR,
25
25
  r as Dropdown,
package/dist/index.js CHANGED
@@ -7,11 +7,11 @@ import { B as N } from "./breadcrumbs-1e887800.js";
7
7
  import { B as z } from "./bubblesLoader-f3ffa240.js";
8
8
  import { BulkPanel as J } from "./bulkPanel.js";
9
9
  import { B as _ } from "./button-7ab874f3.js";
10
- import { C as W } from "./checkbox-b85cd9fa.js";
10
+ import { C as W } from "./checkbox-2b9f889c.js";
11
11
  import { Chip as j } from "./chip.js";
12
- import { D as K } from "./datePicker-18882a46.js";
12
+ import { D as K } from "./datePicker-8453b46f.js";
13
13
  import "react-datepicker";
14
- import { D as Y } from "./dropdown-27dfefb1.js";
14
+ import { D as Y } from "./dropdown-99d0749c.js";
15
15
  import { FieldLabel as $ } from "./fieldLabel.js";
16
16
  import { F as ro } from "./fieldNumber-d1b5a7a1.js";
17
17
  import { F as to } from "./fieldText-1749da7a.js";
@@ -31,7 +31,7 @@ import { S as Lo } from "./spinLoader-c4a53718.js";
31
31
  import { SystemAlert as Eo } from "./systemAlert.js";
32
32
  import { S as ko } from "./systemMessage-924fdaa6.js";
33
33
  import { DragLayer as No, SortableItem as Uo, SortableList as zo, TreeSortableContainer as Ho, TreeSortableItem as Jo } from "./sortable.js";
34
- import { T as _o } from "./table-0392b58d.js";
34
+ import { T as _o } from "./table-701a71d1.js";
35
35
  import { T as Wo } from "./themeProvider-46c2be7b.js";
36
36
  import { T as jo } from "./toggle-304107fa.js";
37
37
  import { Tooltip as Ko } from "./tooltip.js";
@@ -75,7 +75,7 @@ import "framer-motion";
75
75
  import "./useWindowResize-a7e1ac92.js";
76
76
  import "@floating-ui/react";
77
77
  import "./floatingUi-41f8c7b5.js";
78
- import "./useTreeSortable-687d8f74.js";
78
+ import "./useTreeSortable-bc631689.js";
79
79
  import "./common.js";
80
80
  import "react-resizable";
81
81
  export {
package/dist/modal.js CHANGED
@@ -7,7 +7,7 @@ import { u as q } from "./useOnClickOutside-8f7d68a1.js";
7
7
  import "react-dnd";
8
8
  import "react-dnd-html5-backend";
9
9
  import { u as J } from "./useWindowResize-a7e1ac92.js";
10
- import { a as Q } from "./dropdown-27dfefb1.js";
10
+ import { a as Q } from "./dropdown-99d0749c.js";
11
11
  import { K as V } from "./keyCodes-f63c0e11.js";
12
12
  import { B as A } from "./button-7ab874f3.js";
13
13
  import { Tooltip as Z } from "./tooltip.js";
@@ -22,7 +22,7 @@ import "./fieldLabel.js";
22
22
  import "./adaptiveTagList.js";
23
23
  import "./isEmpty-ccacb5ff.js";
24
24
  import "./useEllipsisTitle-462fa254.js";
25
- import "./checkbox-b85cd9fa.js";
25
+ import "./checkbox-2b9f889c.js";
26
26
  import "@floating-ui/react";
27
27
  import "./floatingUi-41f8c7b5.js";
28
28
  const eo = {
package/dist/sidePanel.js CHANGED
@@ -5,7 +5,7 @@ import { K as B } from "./keyCodes-f63c0e11.js";
5
5
  import { u as L } from "./useOnClickOutside-8f7d68a1.js";
6
6
  import "react-dnd";
7
7
  import "react-dnd-html5-backend";
8
- import { a as O } from "./dropdown-27dfefb1.js";
8
+ import { a as O } from "./dropdown-99d0749c.js";
9
9
  import { S as T } from "./close-4d480ef7.js";
10
10
  import { B as j } from "./baseIconButton-251479f7.js";
11
11
  import "react-dom";
@@ -19,7 +19,7 @@ import "./adaptiveTagList.js";
19
19
  import "./button-7ab874f3.js";
20
20
  import "./isEmpty-ccacb5ff.js";
21
21
  import "./useEllipsisTitle-462fa254.js";
22
- import "./checkbox-b85cd9fa.js";
22
+ import "./checkbox-2b9f889c.js";
23
23
  const w = "_active_5ebdz_11", M = "_compact_5ebdz_62", F = "_header_5ebdz_58", H = "_title_5ebdz_88", U = "_description_5ebdz_99", W = "_content_5ebdz_108", Y = "_footer_5ebdz_115", q = "_divider_5ebdz_121", G = {
24
24
  "side-panel-overlay": "_side-panel-overlay_5ebdz_1",
25
25
  active: w,