@reportportal/ui-kit 0.0.1-alpha.55 → 0.0.1-alpha.56

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