@situaction/traq-ui-ste 1.2.34 → 1.2.35
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/components/list/list-controls/ListControls.js +8 -7
- package/dist/components/list/nested-list/NestedList.js +7 -6
- package/dist/components/list/nested-list/item/NestedListItem.js +8 -7
- package/dist/components/menu/Menu.js +3 -2
- package/dist/components/panel/side-panel-header/SidePanelHeader.js +5 -4
- package/dist/components/select/Select.js +3 -2
- package/dist/components/select-filter-input-tags/SelectFilterInputTags.js +5 -4
- package/dist/components/select-multi-items/SelectMultiItems.js +7 -6
- package/dist/components/switch/Switch.js +3 -2
- package/dist/components/tooltip/Tooltip.d.ts +2 -2
- package/dist/components/tooltip/Tooltip.js +83 -35
- package/dist/index-CxdrhfJv.mjs +19066 -0
- package/dist/styles/Tooltip.css +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Button as p } from "../../button/Button.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../../icon-button/IconButton.js";
|
|
5
5
|
import { Checkbox as _ } from "../../checkbox/Checkbox.js";
|
|
6
|
+
import "../../../index-CxdrhfJv.mjs";
|
|
6
7
|
import "../../accordion/Accordion.js";
|
|
7
8
|
import { Icon as a } from "../../icon/Icon.js";
|
|
8
9
|
import "../../modal/Modal.js";
|
|
@@ -15,19 +16,19 @@ const u = "_list_1nihg_6", f = "_children_1nihg_29", g = "_selected_1nihg_43", k
|
|
|
15
16
|
children: f,
|
|
16
17
|
selected: g,
|
|
17
18
|
reset: k
|
|
18
|
-
},
|
|
19
|
+
}, X = ({ listChildren: l, handleItemClick: d, selectedItems: m, onReset: r, labelButtonReset: n }) => /* @__PURE__ */ c("div", { className: i.list, children: [
|
|
19
20
|
/* @__PURE__ */ e("div", { children: l.map((t, h) => {
|
|
20
21
|
if (t.key == null) return null;
|
|
21
|
-
const s = t.key,
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
const s = t.key, o = m.includes(s);
|
|
23
|
+
return /* @__PURE__ */ c(
|
|
23
24
|
"div",
|
|
24
25
|
{
|
|
25
|
-
className: `${
|
|
26
|
+
className: `${o ? i.selected : ""} ${i.children}`,
|
|
26
27
|
children: [
|
|
27
28
|
/* @__PURE__ */ e(
|
|
28
29
|
_,
|
|
29
30
|
{
|
|
30
|
-
checked:
|
|
31
|
+
checked: o,
|
|
31
32
|
onChange: () => d(s)
|
|
32
33
|
}
|
|
33
34
|
),
|
|
@@ -48,5 +49,5 @@ const u = "_list_1nihg_6", f = "_children_1nihg_29", g = "_selected_1nihg_43", k
|
|
|
48
49
|
) })
|
|
49
50
|
] });
|
|
50
51
|
export {
|
|
51
|
-
|
|
52
|
+
X as ListControls
|
|
52
53
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as d, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { NestedListItem as l } from "./item/NestedListItem.js";
|
|
3
3
|
import { Button as c } from "../../button/Button.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "../../icon-button/IconButton.js";
|
|
6
|
+
import "../../../index-CxdrhfJv.mjs";
|
|
6
7
|
import "../../accordion/Accordion.js";
|
|
7
8
|
import { Icon as a } from "../../icon/Icon.js";
|
|
8
9
|
import "../../modal/Modal.js";
|
|
@@ -10,13 +11,13 @@ import "../../carousel/Carousel.js";
|
|
|
10
11
|
import "../../carousel/FadeCarousel.js";
|
|
11
12
|
import "../../theme/ThemeContext.js";
|
|
12
13
|
import '../../../styles/Size.css';import '../../../styles/NestedList.css';/* empty css */
|
|
13
|
-
const h = "_nestedlist_7rnd3_6", _ = "_reset_7rnd3_18",
|
|
14
|
+
const h = "_nestedlist_7rnd3_6", _ = "_reset_7rnd3_18", e = {
|
|
14
15
|
nestedlist: h,
|
|
15
16
|
reset: _
|
|
16
|
-
},
|
|
17
|
-
s.map((n,
|
|
18
|
-
r &&
|
|
17
|
+
}, X = ({ items: s, align: o = "right", onReset: r, children: m, labelButtonReset: i }) => /* @__PURE__ */ d("div", { className: e.nestedlist, children: [
|
|
18
|
+
s.map((n, p) => /* @__PURE__ */ t(l, { ...n, align: o ?? "right", children: m }, p)),
|
|
19
|
+
r && i && /* @__PURE__ */ t("div", { className: e.reset, children: /* @__PURE__ */ t(c, { mode: "ghost", label: i, onClick: r, childrenLeft: /* @__PURE__ */ t(a, { icon: "FunnelX" }) }) })
|
|
19
20
|
] });
|
|
20
21
|
export {
|
|
21
|
-
|
|
22
|
+
X as NestedList
|
|
22
23
|
};
|
|
@@ -3,6 +3,7 @@ import { useState as g, useRef as u, useLayoutEffect as z } from "react";
|
|
|
3
3
|
import "../../../button/Button.js";
|
|
4
4
|
import "../../../icon-button/IconButton.js";
|
|
5
5
|
import { TagCounter as B } from "../../../tag-counter/TagCounter.js";
|
|
6
|
+
import "../../../../index-CxdrhfJv.mjs";
|
|
6
7
|
import "../../../accordion/Accordion.js";
|
|
7
8
|
import { Icon as l } from "../../../icon/Icon.js";
|
|
8
9
|
import { Modal as L } from "../../../modal/Modal.js";
|
|
@@ -15,7 +16,7 @@ const S = "_nestedlist_2r2ga_6", $ = "_items_2r2ga_21", j = "_textSmall_2r2ga_28
|
|
|
15
16
|
items: $,
|
|
16
17
|
textSmall: j,
|
|
17
18
|
modal: v
|
|
18
|
-
},
|
|
19
|
+
}, G = ({
|
|
19
20
|
icon: a,
|
|
20
21
|
title: h,
|
|
21
22
|
numberSelect: i,
|
|
@@ -23,13 +24,13 @@ const S = "_nestedlist_2r2ga_6", $ = "_items_2r2ga_21", j = "_textSmall_2r2ga_28
|
|
|
23
24
|
onClick: m,
|
|
24
25
|
align: e = "right"
|
|
25
26
|
}) => {
|
|
26
|
-
const [c,
|
|
27
|
+
const [c, p] = g(!1), r = u(null), o = u(null), [x, C] = g({
|
|
27
28
|
top: "0px"
|
|
28
29
|
});
|
|
29
30
|
z(() => {
|
|
30
|
-
var
|
|
31
|
+
var d;
|
|
31
32
|
if (r.current && o.current) {
|
|
32
|
-
const N = o.current.getBoundingClientRect(), f = r.current.getBoundingClientRect().width, M = ((
|
|
33
|
+
const N = o.current.getBoundingClientRect(), f = r.current.getBoundingClientRect().width, M = ((d = o.current.parentElement) == null ? void 0 : d.getBoundingClientRect().top) || 0;
|
|
33
34
|
C({
|
|
34
35
|
top: `${N.top - M}px`,
|
|
35
36
|
...e === "right" ? { right: `-${f + 6}px` } : { left: `-${f + 6}px` }
|
|
@@ -37,7 +38,7 @@ const S = "_nestedlist_2r2ga_6", $ = "_items_2r2ga_21", j = "_textSmall_2r2ga_28
|
|
|
37
38
|
}
|
|
38
39
|
}, [c, e]);
|
|
39
40
|
const R = () => {
|
|
40
|
-
|
|
41
|
+
p(!0), m && m();
|
|
41
42
|
};
|
|
42
43
|
return /* @__PURE__ */ n(w, { children: [
|
|
43
44
|
/* @__PURE__ */ n(
|
|
@@ -63,7 +64,7 @@ const S = "_nestedlist_2r2ga_6", $ = "_items_2r2ga_21", j = "_textSmall_2r2ga_28
|
|
|
63
64
|
ref: r,
|
|
64
65
|
className: s.modal,
|
|
65
66
|
open: c,
|
|
66
|
-
onClose: () =>
|
|
67
|
+
onClose: () => p(!1),
|
|
67
68
|
position: x,
|
|
68
69
|
children: _
|
|
69
70
|
}
|
|
@@ -71,5 +72,5 @@ const S = "_nestedlist_2r2ga_6", $ = "_items_2r2ga_21", j = "_textSmall_2r2ga_28
|
|
|
71
72
|
] });
|
|
72
73
|
};
|
|
73
74
|
export {
|
|
74
|
-
|
|
75
|
+
G as NestedListItem
|
|
75
76
|
};
|
|
@@ -2,6 +2,7 @@ import { jsx as n, jsxs as d } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as c, useRef as M, useEffect as B } from "react";
|
|
3
3
|
import { Button as $ } from "../button/Button.js";
|
|
4
4
|
import { IconButton as f } from "../icon-button/IconButton.js";
|
|
5
|
+
import "../../index-CxdrhfJv.mjs";
|
|
5
6
|
import "../accordion/Accordion.js";
|
|
6
7
|
import { Icon as N } from "../icon/Icon.js";
|
|
7
8
|
import { Modal as W } from "../modal/Modal.js";
|
|
@@ -27,7 +28,7 @@ const y = "_fullHeight_11eub_15", O = "_fullWidth_11eub_18", j = "_open_11eub_21
|
|
|
27
28
|
flexVerticalBetweenStart: Y,
|
|
28
29
|
flexHorizontalCenter: Z,
|
|
29
30
|
flexVerticalBetweenCenter: ee
|
|
30
|
-
},
|
|
31
|
+
}, _e = ({ menuItems: s = [], menuParams: a = [], shortLogo: m, logo: p, isOpen: h, defaultOpen: I = !1, selectedId: u }) => {
|
|
31
32
|
const [l, g] = c(I ?? !1), [b, x] = c(u ?? (s.length > 0 ? s[0].id : null)), w = M(null), [H, _] = c(!1), [L, C] = c(!1), [k, E] = c(null), [z, R] = c({}), V = M(null);
|
|
32
33
|
B(() => {
|
|
33
34
|
u != null && x(u);
|
|
@@ -118,5 +119,5 @@ const y = "_fullHeight_11eub_15", O = "_fullWidth_11eub_18", j = "_open_11eub_21
|
|
|
118
119
|
] }) });
|
|
119
120
|
};
|
|
120
121
|
export {
|
|
121
|
-
|
|
122
|
+
_e as Menu
|
|
122
123
|
};
|
|
@@ -2,6 +2,7 @@ import { jsxs as C, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import "../../button/Button.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { IconButton as i } from "../../icon-button/IconButton.js";
|
|
5
|
+
import "../../../index-CxdrhfJv.mjs";
|
|
5
6
|
import "../../accordion/Accordion.js";
|
|
6
7
|
import { Icon as t } from "../../icon/Icon.js";
|
|
7
8
|
import "../../modal/Modal.js";
|
|
@@ -9,11 +10,11 @@ import "../../carousel/Carousel.js";
|
|
|
9
10
|
import "../../carousel/FadeCarousel.js";
|
|
10
11
|
import "../../theme/ThemeContext.js";
|
|
11
12
|
import '../../../styles/Size.css';import '../../../styles/SidePanelHeader.css';/* empty css */
|
|
12
|
-
const c = "_sidePanelHeader_72g7b_6", m = "_buttonArrow_72g7b_13",
|
|
13
|
+
const c = "_sidePanelHeader_72g7b_6", m = "_buttonArrow_72g7b_13", p = "_title_72g7b_20", r = {
|
|
13
14
|
sidePanelHeader: c,
|
|
14
15
|
buttonArrow: m,
|
|
15
|
-
title:
|
|
16
|
-
},
|
|
16
|
+
title: p
|
|
17
|
+
}, H = ({
|
|
17
18
|
title: s,
|
|
18
19
|
icon: o,
|
|
19
20
|
onClickBack: L,
|
|
@@ -75,5 +76,5 @@ const c = "_sidePanelHeader_72g7b_6", m = "_buttonArrow_72g7b_13", h = "_title_7
|
|
|
75
76
|
)
|
|
76
77
|
] });
|
|
77
78
|
export {
|
|
78
|
-
|
|
79
|
+
H as SidePanelHeader
|
|
79
80
|
};
|
|
@@ -3,6 +3,7 @@ import { useState as y, useRef as v, useEffect as d } from "react";
|
|
|
3
3
|
import { Button as W } from "../button/Button.js";
|
|
4
4
|
import { Input as H } from "../input/Input.js";
|
|
5
5
|
import { IconButton as J } from "../icon-button/IconButton.js";
|
|
6
|
+
import "../../index-CxdrhfJv.mjs";
|
|
6
7
|
import "../accordion/Accordion.js";
|
|
7
8
|
import { Icon as _ } from "../icon/Icon.js";
|
|
8
9
|
import { Modal as Q } from "../modal/Modal.js";
|
|
@@ -19,7 +20,7 @@ const X = "_selectContainer_133eb_54", Y = "_children_133eb_61", Z = "_active_13
|
|
|
19
20
|
itemLabel: ee,
|
|
20
21
|
searchWrapper: te,
|
|
21
22
|
noResults: ne
|
|
22
|
-
},
|
|
23
|
+
}, ve = ({
|
|
23
24
|
selected: k,
|
|
24
25
|
size: g = "m",
|
|
25
26
|
listItem: h,
|
|
@@ -215,5 +216,5 @@ const X = "_selectContainer_133eb_54", Y = "_children_133eb_61", Z = "_active_13
|
|
|
215
216
|
] });
|
|
216
217
|
};
|
|
217
218
|
export {
|
|
218
|
-
|
|
219
|
+
ve as Select
|
|
219
220
|
};
|
|
@@ -3,15 +3,16 @@ import "../button/Button.js";
|
|
|
3
3
|
import "react";
|
|
4
4
|
import { Input as p } from "../input/Input.js";
|
|
5
5
|
import "../icon-button/IconButton.js";
|
|
6
|
+
import "../../index-CxdrhfJv.mjs";
|
|
6
7
|
import "../accordion/Accordion.js";
|
|
7
8
|
import "../modal/Modal.js";
|
|
8
9
|
import "../carousel/Carousel.js";
|
|
9
10
|
import "../carousel/FadeCarousel.js";
|
|
10
11
|
import "../theme/ThemeContext.js";
|
|
11
12
|
import '../../styles/Size.css';import '../../styles/SelectFilterInputTags.css';/* empty css */
|
|
12
|
-
const
|
|
13
|
-
listTagSelect:
|
|
14
|
-
},
|
|
13
|
+
const m = "_listTagSelect_2v3fb_6", a = {
|
|
14
|
+
listTagSelect: m
|
|
15
|
+
}, _ = ({ children: o, inputValue: r, handleInputChange: s, handleKeyDown: i }) => /* @__PURE__ */ e("div", { className: a.listTagSelect, children: /* @__PURE__ */ l("div", { children: [
|
|
15
16
|
o,
|
|
16
17
|
/* @__PURE__ */ e("div", { className: "flexAutoSize", children: /* @__PURE__ */ e(
|
|
17
18
|
p,
|
|
@@ -30,5 +31,5 @@ const a = "_listTagSelect_2v3fb_6", c = {
|
|
|
30
31
|
) })
|
|
31
32
|
] }) });
|
|
32
33
|
export {
|
|
33
|
-
|
|
34
|
+
_ as SelectFilterInputTags
|
|
34
35
|
};
|
|
@@ -4,6 +4,7 @@ import { n as v, s as C, a as x } from "../../X.es-BEJ-zMPl.mjs";
|
|
|
4
4
|
import { Button as M } from "../button/Button.js";
|
|
5
5
|
import "../icon-button/IconButton.js";
|
|
6
6
|
import { TagCounter as w } from "../tag-counter/TagCounter.js";
|
|
7
|
+
import "../../index-CxdrhfJv.mjs";
|
|
7
8
|
import "../accordion/Accordion.js";
|
|
8
9
|
import { Modal as y } from "../modal/Modal.js";
|
|
9
10
|
import "../carousel/Carousel.js";
|
|
@@ -14,16 +15,16 @@ const N = "_relative_w7e9a_6", R = "_tagCounter_w7e9a_10", b = "_modal_w7e9a_18"
|
|
|
14
15
|
relative: N,
|
|
15
16
|
tagCounter: R,
|
|
16
17
|
modal: b
|
|
17
|
-
},
|
|
18
|
+
}, E = ({
|
|
18
19
|
label: a,
|
|
19
20
|
iconButton: l,
|
|
20
21
|
selectedCount: t = 0,
|
|
21
|
-
onClearSelection:
|
|
22
|
-
children:
|
|
22
|
+
onClearSelection: m,
|
|
23
|
+
children: n,
|
|
23
24
|
size: c = "m",
|
|
24
25
|
align: p = "right"
|
|
25
26
|
}) => {
|
|
26
|
-
const [e, i] = _(!1), d = h(null), f = () => i(!1), g = t > 0 ? /* @__PURE__ */ o(v, { onClick:
|
|
27
|
+
const [e, i] = _(!1), d = h(null), f = () => i(!1), g = t > 0 ? /* @__PURE__ */ o(v, { onClick: m }) : e ? /* @__PURE__ */ o(C, {}) : /* @__PURE__ */ o(x, {}), u = t > 0 ? "secondary" : "tertiary";
|
|
27
28
|
return /* @__PURE__ */ s("div", { className: r.relative, children: [
|
|
28
29
|
/* @__PURE__ */ o(
|
|
29
30
|
M,
|
|
@@ -39,9 +40,9 @@ const N = "_relative_w7e9a_6", R = "_tagCounter_w7e9a_10", b = "_modal_w7e9a_18"
|
|
|
39
40
|
onClick: () => i(!e)
|
|
40
41
|
}
|
|
41
42
|
),
|
|
42
|
-
/* @__PURE__ */ o(y, { ref: d, open: e, onClose: f, className: r.modal, position: { top: "calc(100% + 6px)", ...p === "right" ? { left: "0" } : { right: "0" } }, children:
|
|
43
|
+
/* @__PURE__ */ o(y, { ref: d, open: e, onClose: f, className: r.modal, position: { top: "calc(100% + 6px)", ...p === "right" ? { left: "0" } : { right: "0" } }, children: n })
|
|
43
44
|
] });
|
|
44
45
|
};
|
|
45
46
|
export {
|
|
46
|
-
|
|
47
|
+
E as SelectMultiItems
|
|
47
48
|
};
|
|
@@ -2,6 +2,7 @@ import { jsxs as n, jsx as c } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as $, useEffect as b } from "react";
|
|
3
3
|
import "../button/Button.js";
|
|
4
4
|
import { IconButton as k } from "../icon-button/IconButton.js";
|
|
5
|
+
import "../../index-CxdrhfJv.mjs";
|
|
5
6
|
import "../accordion/Accordion.js";
|
|
6
7
|
import { Icon as g } from "../icon/Icon.js";
|
|
7
8
|
import "../modal/Modal.js";
|
|
@@ -20,7 +21,7 @@ const y = "_slider_1mxgk_21", I = "_s_1mxgk_6", N = "_m_1mxgk_58", S = "_l_1mxgk
|
|
|
20
21
|
wrapper: E,
|
|
21
22
|
button: R,
|
|
22
23
|
active: T
|
|
23
|
-
},
|
|
24
|
+
}, P = ({
|
|
24
25
|
size: i = "m",
|
|
25
26
|
variant: w = "classic",
|
|
26
27
|
checked: l,
|
|
@@ -92,5 +93,5 @@ const y = "_slider_1mxgk_21", I = "_s_1mxgk_6", N = "_m_1mxgk_58", S = "_l_1mxgk
|
|
|
92
93
|
] });
|
|
93
94
|
};
|
|
94
95
|
export {
|
|
95
|
-
|
|
96
|
+
P as Switch
|
|
96
97
|
};
|
|
@@ -15,8 +15,8 @@ export type TooltipProps = {
|
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
17
|
* Tooltip component that shows additional information when hovering over an element.
|
|
18
|
-
*
|
|
19
|
-
*
|
|
18
|
+
* Renders via a portal to escape overflow/scroll containers, and automatically
|
|
19
|
+
* adjusts position to stay within the viewport.
|
|
20
20
|
*/
|
|
21
21
|
export declare const Tooltip: FC<TooltipProps>;
|
|
22
22
|
export default Tooltip;
|
|
@@ -1,44 +1,92 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
tooltip:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
import { jsxs as S, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { useState as w, useRef as x, useCallback as L, useLayoutEffect as T } from "react";
|
|
3
|
+
import { r as j } from "../../index-CxdrhfJv.mjs";
|
|
4
|
+
import '../../styles/Tooltip.css';const I = "_tooltip_ymexm_30", y = {
|
|
5
|
+
"tooltip-container": "_tooltip-container_ymexm_30",
|
|
6
|
+
tooltip: I
|
|
7
|
+
}, W = {
|
|
8
|
+
"xs-5": 6,
|
|
9
|
+
"xs-3": 10,
|
|
10
|
+
xs: 14,
|
|
11
|
+
"m-1": 18
|
|
12
|
+
}, r = 8, N = ({ children: v, content: k, position: u = "top", gap: M = "xs-5", padding: _ = "xs-5" }) => {
|
|
13
|
+
const [l, g] = w(!1), [E, h] = w({ visibility: "hidden" }), n = x(null), d = x(null), o = W[M] ?? 6, f = L((t, e) => {
|
|
14
|
+
const a = window.innerWidth, m = window.innerHeight;
|
|
15
|
+
let s, i;
|
|
16
|
+
switch (u) {
|
|
17
|
+
case "top":
|
|
18
|
+
s = t.top - e.height - o, i = t.left + t.width / 2 - e.width / 2;
|
|
19
|
+
break;
|
|
20
|
+
case "topLeft":
|
|
21
|
+
s = t.top - e.height - o, i = t.right - e.width;
|
|
22
|
+
break;
|
|
23
|
+
case "topRight":
|
|
24
|
+
s = t.top - e.height - o, i = t.left;
|
|
25
|
+
break;
|
|
26
|
+
case "bottom":
|
|
27
|
+
s = t.bottom + o, i = t.left + t.width / 2 - e.width / 2;
|
|
28
|
+
break;
|
|
29
|
+
case "bottomLeft":
|
|
30
|
+
s = t.bottom + o, i = t.right - e.width;
|
|
31
|
+
break;
|
|
32
|
+
case "bottomRight":
|
|
33
|
+
s = t.bottom + o, i = t.left;
|
|
34
|
+
break;
|
|
35
|
+
case "left":
|
|
36
|
+
s = t.top + t.height / 2 - e.height / 2, i = t.left - e.width - o;
|
|
37
|
+
break;
|
|
38
|
+
case "right":
|
|
39
|
+
s = t.top + t.height / 2 - e.height / 2, i = t.right + o;
|
|
40
|
+
break;
|
|
41
|
+
default:
|
|
42
|
+
s = t.top - e.height - o, i = t.left + t.width / 2 - e.width / 2;
|
|
43
|
+
}
|
|
44
|
+
return i = Math.max(r, Math.min(i, a - e.width - r)), s = Math.max(r, Math.min(s, m - e.height - r)), { position: "fixed", top: s, left: i, visibility: "visible" };
|
|
45
|
+
}, [u, o]);
|
|
46
|
+
T(() => {
|
|
47
|
+
const t = [
|
|
48
|
+
"--background-tooltip",
|
|
49
|
+
"--general-border-window",
|
|
50
|
+
"--general-text-icons",
|
|
51
|
+
"--shadow-color-minimal"
|
|
52
|
+
];
|
|
53
|
+
if (l && n.current && d.current) {
|
|
54
|
+
const e = getComputedStyle(n.current), a = t.reduce((i, b) => {
|
|
55
|
+
const p = e.getPropertyValue(b).trim();
|
|
56
|
+
return p && (i[b] = p), i;
|
|
57
|
+
}, {}), m = n.current.getBoundingClientRect(), s = d.current.getBoundingClientRect();
|
|
58
|
+
h({ ...f(m, s), ...a });
|
|
59
|
+
}
|
|
60
|
+
}, [l, f]);
|
|
61
|
+
const C = () => {
|
|
62
|
+
h({ visibility: "hidden" }), g(!0);
|
|
63
|
+
}, V = [y.tooltip, "labelMedium", "fontWeight-600"].join(" "), P = { "--dynamic-padding": `var(--spacing-${_})` };
|
|
64
|
+
return /* @__PURE__ */ S(
|
|
28
65
|
"div",
|
|
29
66
|
{
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
onMouseEnter:
|
|
33
|
-
onMouseLeave: () =>
|
|
67
|
+
ref: n,
|
|
68
|
+
className: y["tooltip-container"],
|
|
69
|
+
onMouseEnter: C,
|
|
70
|
+
onMouseLeave: () => g(!1),
|
|
34
71
|
children: [
|
|
35
|
-
|
|
36
|
-
|
|
72
|
+
v,
|
|
73
|
+
l && j.createPortal(
|
|
74
|
+
/* @__PURE__ */ c(
|
|
75
|
+
"div",
|
|
76
|
+
{
|
|
77
|
+
ref: d,
|
|
78
|
+
className: V,
|
|
79
|
+
style: { ...P, ...E },
|
|
80
|
+
children: k
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
document.body
|
|
84
|
+
)
|
|
37
85
|
]
|
|
38
86
|
}
|
|
39
87
|
);
|
|
40
88
|
};
|
|
41
89
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
90
|
+
N as Tooltip,
|
|
91
|
+
N as default
|
|
44
92
|
};
|