@reportportal/ui-kit 0.0.1-alpha.115 → 0.0.1-alpha.117

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