@reportportal/ui-kit 0.0.1-alpha.216 → 0.0.1-alpha.217

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.
@@ -5,6 +5,7 @@ interface TooltipProps {
5
5
  content: ReactNode;
6
6
  children: ReactNode;
7
7
  wrapperClassName?: string;
8
+ wrapperTabIndex?: number;
8
9
  tooltipClassName?: string;
9
10
  contentClassName?: string;
10
11
  dynamicWidth?: boolean;
package/dist/tooltip.js CHANGED
@@ -1,82 +1,83 @@
1
- import { jsxs as u, Fragment as P, jsx as s } from "react/jsx-runtime";
2
- import { useState as R, useRef as f } from "react";
3
- import { createPortal as G } from "react-dom";
4
- import { c as j } from "./bind-06a7ff84.js";
5
- import { useFloating as k, offset as $, flip as B, arrow as C, autoUpdate as U, FloatingArrow as Y } from "@floating-ui/react";
6
- import { T as h, g as Z, a as q, b as z } from "./floatingUi-46f5b896.js";
7
- const J = {
1
+ import { jsxs as u, Fragment as R, jsx as s } from "react/jsx-runtime";
2
+ import { useState as G, useRef as f } from "react";
3
+ import { createPortal as j } from "react-dom";
4
+ import { c as k } from "./bind-06a7ff84.js";
5
+ import { useFloating as $, offset as B, flip as C, arrow as U, autoUpdate as Y, FloatingArrow as Z } from "@floating-ui/react";
6
+ import { T as h, g as q, a as z, b as J } from "./floatingUi-46f5b896.js";
7
+ const K = {
8
8
  "tooltip-wrapper": "_tooltip-wrapper_1n6ya_16",
9
9
  "tooltip-content": "_tooltip-content_1n6ya_26"
10
- }, i = j.bind(J), K = 300, Q = 100, st = ({
10
+ }, i = k.bind(K), Q = 300, V = 100, it = ({
11
11
  content: g,
12
12
  wrapperClassName: x,
13
- tooltipClassName: T,
14
- contentClassName: w,
15
- dynamicWidth: _,
16
- width: A,
17
- minWidth: E = 120,
18
- safeZone: b = 4,
19
- zIndex: y = 9,
20
- placement: I = "bottom",
21
- arrowColor: N = "rgba(34, 34, 34, 0.91)",
22
- dataAutomationId: F,
23
- mainAxis: O = !0,
24
- children: S,
13
+ wrapperTabIndex: T = 0,
14
+ tooltipClassName: w,
15
+ contentClassName: _,
16
+ dynamicWidth: A,
17
+ width: E,
18
+ minWidth: b = 120,
19
+ safeZone: y = 4,
20
+ zIndex: I = 9,
21
+ placement: N = "bottom",
22
+ arrowColor: F = "rgba(34, 34, 34, 0.91)",
23
+ dataAutomationId: O,
24
+ mainAxis: S = !0,
25
+ children: W,
25
26
  portalRoot: r,
26
- isFloating: W = !0
27
+ isFloating: v = !0
27
28
  }) => {
28
- const [a, l] = R(!1), c = f(null), e = f(), { refs: m, floatingStyles: v, context: L } = k({
29
+ const [a, l] = G(!1), c = f(null), e = f(), { refs: m, floatingStyles: L, context: M } = $({
29
30
  open: a,
30
- placement: I,
31
+ placement: N,
31
32
  middleware: [
32
- $(({ rects: t, placement: H }) => ({
33
- mainAxis: b + h,
34
- alignmentAxis: Z(t, H)
33
+ B(({ rects: t, placement: P }) => ({
34
+ mainAxis: y + h,
35
+ alignmentAxis: q(t, P)
35
36
  })),
36
- W && B({
37
- mainAxis: O,
37
+ v && C({
38
+ mainAxis: S,
38
39
  fallbackAxisSideDirection: "start",
39
- fallbackPlacements: q
40
+ fallbackPlacements: z
40
41
  }),
41
- C({
42
+ U({
42
43
  element: c
43
44
  })
44
45
  ],
45
- whileElementsMounted: U
46
- }), o = _ ? null : { width: `${A}px` }, M = document.documentElement.clientWidth, D = o || M - Q, n = () => {
46
+ whileElementsMounted: Y
47
+ }), o = A ? null : { width: `${E}px` }, D = document.documentElement.clientWidth, H = o || D - V, n = () => {
47
48
  e.current && clearTimeout(e.current), l(!1);
48
49
  }, d = () => {
49
- e.current = setTimeout(() => l(!0), K);
50
+ e.current = setTimeout(() => l(!0), Q);
50
51
  }, p = () => /* @__PURE__ */ u(
51
52
  "div",
52
53
  {
53
54
  ref: m.setFloating,
54
55
  style: {
55
- ...v,
56
+ ...L,
56
57
  ...o,
57
- minWidth: E,
58
- zIndex: y,
58
+ minWidth: b,
59
+ zIndex: I,
59
60
  pointerEvents: "none"
60
61
  },
61
- "data-automation-id": F,
62
- className: i(T),
62
+ "data-automation-id": O,
63
+ className: i(w),
63
64
  children: [
64
65
  /* @__PURE__ */ s(
65
- Y,
66
+ Z,
66
67
  {
67
68
  ref: c,
68
- context: L,
69
- width: z,
69
+ context: M,
70
+ width: J,
70
71
  height: h,
71
- fill: N
72
+ fill: F
72
73
  }
73
74
  ),
74
75
  /* @__PURE__ */ s(
75
76
  "div",
76
77
  {
77
- className: i("tooltip-content", w),
78
+ className: i("tooltip-content", _),
78
79
  style: {
79
- maxWidth: `${D}px`
80
+ maxWidth: `${H}px`
80
81
  },
81
82
  children: g
82
83
  }
@@ -84,7 +85,7 @@ const J = {
84
85
  ]
85
86
  }
86
87
  );
87
- return /* @__PURE__ */ u(P, { children: [
88
+ return /* @__PURE__ */ u(R, { children: [
88
89
  /* @__PURE__ */ s(
89
90
  "div",
90
91
  {
@@ -97,13 +98,13 @@ const J = {
97
98
  t.target === t.currentTarget && d();
98
99
  },
99
100
  onBlur: n,
100
- tabIndex: 0,
101
- children: S
101
+ tabIndex: T,
102
+ children: W
102
103
  }
103
104
  ),
104
- a && (r ? G(p(), r) : p())
105
+ a && (r ? j(p(), r) : p())
105
106
  ] });
106
107
  };
107
108
  export {
108
- st as Tooltip
109
+ it as Tooltip
109
110
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reportportal/ui-kit",
3
- "version": "0.0.1-alpha.216",
3
+ "version": "0.0.1-alpha.217",
4
4
  "description": "The UI-kit library for ReportPortal Design System.",
5
5
  "type": "module",
6
6
  "scripts": {