tgui-core 1.1.2 → 1.1.4

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.
@@ -1,85 +1,86 @@
1
- import { jsxs as M, Fragment as P, jsx as S } from "react/jsx-runtime";
2
- import * as l from "react";
3
- import { useState as E, useRef as g, useEffect as F } from "react";
4
- import * as _ from "react-dom";
5
- import { c as A } from "../popper-CiqSDJTE.js";
6
- var j = function(r) {
7
- return r.reduce(function(n, t) {
8
- var o = t[0], u = t[1];
9
- return n[o] = u, n;
1
+ import { jsxs as M, Fragment as j, jsx as E } from "react/jsx-runtime";
2
+ import * as c from "react";
3
+ import { useState as O, useRef as R, useEffect as N } from "react";
4
+ import * as x from "react-dom";
5
+ import { c as A } from "../index-jLZg_duJ.js";
6
+ var W = c.createContext(), Y = c.createContext();
7
+ var P = function(r) {
8
+ return r.reduce(function(n, e) {
9
+ var o = e[0], a = e[1];
10
+ return n[o] = a, n;
10
11
  }, {});
11
- }, R = typeof window < "u" && window.document && window.document.createElement ? l.useLayoutEffect : l.useEffect;
12
- function I(e) {
13
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
12
+ }, S = typeof window < "u" && window.document && window.document.createElement ? c.useLayoutEffect : c.useEffect;
13
+ function I(t) {
14
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
14
15
  }
15
- var U = typeof Element < "u", x = typeof Map == "function", z = typeof Set == "function", B = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
16
- function w(e, r) {
17
- if (e === r) return !0;
18
- if (e && r && typeof e == "object" && typeof r == "object") {
19
- if (e.constructor !== r.constructor) return !1;
20
- var n, t, o;
21
- if (Array.isArray(e)) {
22
- if (n = e.length, n != r.length) return !1;
23
- for (t = n; t-- !== 0; )
24
- if (!w(e[t], r[t])) return !1;
16
+ var _ = typeof Element < "u", F = typeof Map == "function", b = typeof Set == "function", D = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
17
+ function g(t, r) {
18
+ if (t === r) return !0;
19
+ if (t && r && typeof t == "object" && typeof r == "object") {
20
+ if (t.constructor !== r.constructor) return !1;
21
+ var n, e, o;
22
+ if (Array.isArray(t)) {
23
+ if (n = t.length, n != r.length) return !1;
24
+ for (e = n; e-- !== 0; )
25
+ if (!g(t[e], r[e])) return !1;
25
26
  return !0;
26
27
  }
27
- var u;
28
- if (x && e instanceof Map && r instanceof Map) {
29
- if (e.size !== r.size) return !1;
30
- for (u = e.entries(); !(t = u.next()).done; )
31
- if (!r.has(t.value[0])) return !1;
32
- for (u = e.entries(); !(t = u.next()).done; )
33
- if (!w(t.value[1], r.get(t.value[0]))) return !1;
28
+ var a;
29
+ if (F && t instanceof Map && r instanceof Map) {
30
+ if (t.size !== r.size) return !1;
31
+ for (a = t.entries(); !(e = a.next()).done; )
32
+ if (!r.has(e.value[0])) return !1;
33
+ for (a = t.entries(); !(e = a.next()).done; )
34
+ if (!g(e.value[1], r.get(e.value[0]))) return !1;
34
35
  return !0;
35
36
  }
36
- if (z && e instanceof Set && r instanceof Set) {
37
- if (e.size !== r.size) return !1;
38
- for (u = e.entries(); !(t = u.next()).done; )
39
- if (!r.has(t.value[0])) return !1;
37
+ if (b && t instanceof Set && r instanceof Set) {
38
+ if (t.size !== r.size) return !1;
39
+ for (a = t.entries(); !(e = a.next()).done; )
40
+ if (!r.has(e.value[0])) return !1;
40
41
  return !0;
41
42
  }
42
- if (B && ArrayBuffer.isView(e) && ArrayBuffer.isView(r)) {
43
- if (n = e.length, n != r.length) return !1;
44
- for (t = n; t-- !== 0; )
45
- if (e[t] !== r[t]) return !1;
43
+ if (D && ArrayBuffer.isView(t) && ArrayBuffer.isView(r)) {
44
+ if (n = t.length, n != r.length) return !1;
45
+ for (e = n; e-- !== 0; )
46
+ if (t[e] !== r[e]) return !1;
46
47
  return !0;
47
48
  }
48
- if (e.constructor === RegExp) return e.source === r.source && e.flags === r.flags;
49
- if (e.valueOf !== Object.prototype.valueOf && typeof e.valueOf == "function" && typeof r.valueOf == "function") return e.valueOf() === r.valueOf();
50
- if (e.toString !== Object.prototype.toString && typeof e.toString == "function" && typeof r.toString == "function") return e.toString() === r.toString();
51
- if (o = Object.keys(e), n = o.length, n !== Object.keys(r).length) return !1;
52
- for (t = n; t-- !== 0; )
53
- if (!Object.prototype.hasOwnProperty.call(r, o[t])) return !1;
54
- if (U && e instanceof Element) return !1;
55
- for (t = n; t-- !== 0; )
56
- if (!((o[t] === "_owner" || o[t] === "__v" || o[t] === "__o") && e.$$typeof) && !w(e[o[t]], r[o[t]]))
49
+ if (t.constructor === RegExp) return t.source === r.source && t.flags === r.flags;
50
+ if (t.valueOf !== Object.prototype.valueOf && typeof t.valueOf == "function" && typeof r.valueOf == "function") return t.valueOf() === r.valueOf();
51
+ if (t.toString !== Object.prototype.toString && typeof t.toString == "function" && typeof r.toString == "function") return t.toString() === r.toString();
52
+ if (o = Object.keys(t), n = o.length, n !== Object.keys(r).length) return !1;
53
+ for (e = n; e-- !== 0; )
54
+ if (!Object.prototype.hasOwnProperty.call(r, o[e])) return !1;
55
+ if (_ && t instanceof Element) return !1;
56
+ for (e = n; e-- !== 0; )
57
+ if (!((o[e] === "_owner" || o[e] === "__v" || o[e] === "__o") && t.$$typeof) && !g(t[o[e]], r[o[e]]))
57
58
  return !1;
58
59
  return !0;
59
60
  }
60
- return e !== e && r !== r;
61
+ return t !== t && r !== r;
61
62
  }
62
- var L = function(r, n) {
63
+ var U = function(r, n) {
63
64
  try {
64
- return w(r, n);
65
- } catch (t) {
66
- if ((t.message || "").match(/stack|recursion/i))
65
+ return g(r, n);
66
+ } catch (e) {
67
+ if ((e.message || "").match(/stack|recursion/i))
67
68
  return console.warn("react-fast-compare cannot handle circular refs"), !1;
68
- throw t;
69
+ throw e;
69
70
  }
70
71
  };
71
- const q = /* @__PURE__ */ I(L);
72
- var D = [], $ = function(r, n, t) {
73
- t === void 0 && (t = {});
74
- var o = l.useRef(null), u = {
75
- onFirstUpdate: t.onFirstUpdate,
76
- placement: t.placement || "bottom",
77
- strategy: t.strategy || "absolute",
78
- modifiers: t.modifiers || D
79
- }, m = l.useState({
72
+ const $ = /* @__PURE__ */ I(U);
73
+ var C = [], B = function(r, n, e) {
74
+ e === void 0 && (e = {});
75
+ var o = c.useRef(null), a = {
76
+ onFirstUpdate: e.onFirstUpdate,
77
+ placement: e.placement || "bottom",
78
+ strategy: e.strategy || "absolute",
79
+ modifiers: e.modifiers || C
80
+ }, l = c.useState({
80
81
  styles: {
81
82
  popper: {
82
- position: u.strategy,
83
+ position: a.strategy,
83
84
  left: "0",
84
85
  top: "0"
85
86
  },
@@ -88,90 +89,119 @@ var D = [], $ = function(r, n, t) {
88
89
  }
89
90
  },
90
91
  attributes: {}
91
- }), y = m[0], O = m[1], v = l.useMemo(function() {
92
+ }), v = l[0], h = l[1], y = c.useMemo(function() {
92
93
  return {
93
94
  name: "updateState",
94
95
  enabled: !0,
95
96
  phase: "write",
96
- fn: function(d) {
97
- var i = d.state, f = Object.keys(i.elements);
98
- _.flushSync(function() {
99
- O({
100
- styles: j(f.map(function(c) {
101
- return [c, i.styles[c] || {}];
97
+ fn: function(m) {
98
+ var p = m.state, f = Object.keys(p.elements);
99
+ x.flushSync(function() {
100
+ h({
101
+ styles: P(f.map(function(i) {
102
+ return [i, p.styles[i] || {}];
102
103
  })),
103
- attributes: j(f.map(function(c) {
104
- return [c, i.attributes[c]];
104
+ attributes: P(f.map(function(i) {
105
+ return [i, p.attributes[i]];
105
106
  }))
106
107
  });
107
108
  });
108
109
  },
109
110
  requires: ["computeStyles"]
110
111
  };
111
- }, []), p = l.useMemo(function() {
112
- var a = {
113
- onFirstUpdate: u.onFirstUpdate,
114
- placement: u.placement,
115
- strategy: u.strategy,
116
- modifiers: [].concat(u.modifiers, [v, {
112
+ }, []), d = c.useMemo(function() {
113
+ var s = {
114
+ onFirstUpdate: a.onFirstUpdate,
115
+ placement: a.placement,
116
+ strategy: a.strategy,
117
+ modifiers: [].concat(a.modifiers, [y, {
117
118
  name: "applyStyles",
118
119
  enabled: !1
119
120
  }])
120
121
  };
121
- return q(o.current, a) ? o.current || a : (o.current = a, a);
122
- }, [u.onFirstUpdate, u.placement, u.strategy, u.modifiers, v]), s = l.useRef();
123
- return R(function() {
124
- s.current && s.current.setOptions(p);
125
- }, [p]), R(function() {
122
+ return $(o.current, s) ? o.current || s : (o.current = s, s);
123
+ }, [a.onFirstUpdate, a.placement, a.strategy, a.modifiers, y]), u = c.useRef();
124
+ return S(function() {
125
+ u.current && u.current.setOptions(d);
126
+ }, [d]), S(function() {
126
127
  if (!(r == null || n == null)) {
127
- var a = t.createPopper || A, d = a(r, n, p);
128
- return s.current = d, function() {
129
- d.destroy(), s.current = null;
128
+ var s = e.createPopper || A, m = s(r, n, d);
129
+ return u.current = m, function() {
130
+ m.destroy(), u.current = null;
130
131
  };
131
132
  }
132
- }, [r, n, t.createPopper]), {
133
- state: s.current ? s.current.state : null,
134
- styles: y.styles,
135
- attributes: y.attributes,
136
- update: s.current ? s.current.update : null,
137
- forceUpdate: s.current ? s.current.forceUpdate : null
133
+ }, [r, n, e.createPopper]), {
134
+ state: u.current ? u.current.state : null,
135
+ styles: v.styles,
136
+ attributes: v.attributes,
137
+ update: u.current ? u.current.update : null,
138
+ forceUpdate: u.current ? u.current.forceUpdate : null
138
139
  };
139
140
  };
140
- function W(e) {
141
- const { children: r, content: n, isOpen: t, onClickOutside: o, placement: u } = e, [m, y] = E(null), [O, v] = E(
141
+ var q = process.env.NODE_ENV !== "production", z = function() {
142
+ };
143
+ if (q) {
144
+ var L = function(r, n) {
145
+ var e = arguments.length;
146
+ n = new Array(e > 1 ? e - 1 : 0);
147
+ for (var o = 1; o < e; o++)
148
+ n[o - 1] = arguments[o];
149
+ var a = 0, l = "Warning: " + r.replace(/%s/g, function() {
150
+ return n[a++];
151
+ });
152
+ typeof console < "u" && console.error(l);
153
+ try {
154
+ throw new Error(l);
155
+ } catch {
156
+ }
157
+ };
158
+ z = function(t, r, n) {
159
+ var e = arguments.length;
160
+ n = new Array(e > 2 ? e - 2 : 0);
161
+ for (var o = 2; o < e; o++)
162
+ n[o - 2] = arguments[o];
163
+ if (r === void 0)
164
+ throw new Error(
165
+ "`warning(condition, format, ...args)` requires a warning message argument"
166
+ );
167
+ t || L.apply(null, [r].concat(n));
168
+ };
169
+ }
170
+ function G(t) {
171
+ const { children: r, content: n, isOpen: e, onClickOutside: o, placement: a } = t, [l, v] = O(null), [h, y] = O(
142
172
  null
143
- ), p = g(null), s = g(null), { styles: a, attributes: d } = $(m, O, {
144
- placement: u
173
+ ), d = R(null), u = R(null), { styles: s, attributes: m } = B(l, h, {
174
+ placement: a
145
175
  });
146
- function i(f) {
147
- var c, h;
148
- !((c = p.current) != null && c.contains(f.target)) && !((h = s.current) != null && h.contains(f.target)) && (o == null || o());
176
+ function p(f) {
177
+ var i, w;
178
+ !((i = d.current) != null && i.contains(f.target)) && !((w = u.current) != null && w.contains(f.target)) && (o == null || o());
149
179
  }
150
- return F(() => (t ? document.addEventListener("mousedown", i) : document.removeEventListener("mousedown", i), () => {
151
- document.removeEventListener("mousedown", i);
152
- }), [t]), /* @__PURE__ */ M(P, { children: [
153
- /* @__PURE__ */ S(
180
+ return N(() => (e ? document.addEventListener("mousedown", p) : document.removeEventListener("mousedown", p), () => {
181
+ document.removeEventListener("mousedown", p);
182
+ }), [e]), /* @__PURE__ */ M(j, { children: [
183
+ /* @__PURE__ */ E(
154
184
  "div",
155
185
  {
156
186
  ref: (f) => {
157
- y(f), s.current = f;
187
+ v(f), u.current = f;
158
188
  },
159
189
  children: r
160
190
  }
161
191
  ),
162
- t && /* @__PURE__ */ S(
192
+ e && /* @__PURE__ */ E(
163
193
  "div",
164
194
  {
165
195
  ref: (f) => {
166
- v(f), p.current = f;
196
+ y(f), d.current = f;
167
197
  },
168
- style: { ...a.popper, zIndex: e.baseZIndex ?? 5 },
169
- ...d.popper,
198
+ style: { ...s.popper, zIndex: t.baseZIndex ?? 5 },
199
+ ...m.popper,
170
200
  children: n
171
201
  }
172
202
  )
173
203
  ] });
174
204
  }
175
205
  export {
176
- W as Popper
206
+ G as Popper
177
207
  };
@@ -1,19 +1,46 @@
1
- import { CSSProperties, PropsWithChildren } from 'react';
1
+ import { PropsWithChildren } from 'react';
2
2
  import { BoxProps } from './Box';
3
3
 
4
4
  type Props = {
5
+ /**
6
+ * Current progress as a floating point number between `minValue` (default: 0) and `maxValue` (default: 1).
7
+ * Determines the percentage and how filled the bar is.
8
+ */
5
9
  value: number;
6
10
  } & Partial<{
7
- backgroundColor: string;
8
- className: string;
11
+ /**
12
+ * Color of the progress bar. Can take any of the following formats:
13
+ * - `#ffffff` - Hex format
14
+ * - `rgb(r,g,b) / rgba(r,g,b,a)` - RGB format
15
+ * - `<name>` - the name of a `color-<name>` CSS class. See `CSS_COLORS` in `constants.js`.
16
+ * - `<name>` - the name of a base CSS color, if not overridden by the definitions above.
17
+ */
9
18
  color: string;
10
- height: string | number;
19
+ /** Highest possible value. */
11
20
  maxValue: number;
21
+ /** Lowest possible value. */
12
22
  minValue: number;
23
+ /**
24
+ * Applies a `color` to the progress bar based on whether the value lands in the range between `from` and `to`.
25
+ * This takes an object with the following format:
26
+ * ```tsx
27
+ * {
28
+ * (colorname): [from, to]
29
+ * }
30
+ * ```
31
+ * For example:
32
+ * ```tsx
33
+ * <ProgressBar
34
+ * value={0.5}
35
+ * ranges={{
36
+ * bad: [0, 0.5],
37
+ * good: [0.5, 1],
38
+ * }}
39
+ * />
40
+ * ```
41
+ *
42
+ */
13
43
  ranges: Record<string, [number, number]>;
14
- style: CSSProperties;
15
- title: string;
16
- width: string | number;
17
44
  }> & BoxProps & PropsWithChildren;
18
45
  export declare function ProgressBar(props: Props): import("react/jsx-runtime").JSX.Element;
19
46
  export {};
@@ -1,6 +1,6 @@
1
1
  import { jsxs as g, jsx as n } from "react/jsx-runtime";
2
2
  import { CSS_COLORS as v } from "../common/constants.js";
3
- import { keyOfMatchingRange as y, toFixed as N, scale as _, clamp01 as B } from "../common/math.js";
3
+ import { scale as y, keyOfMatchingRange as N, clamp01 as _, toFixed as B } from "../common/math.js";
4
4
  import { classes as m } from "../common/react.js";
5
5
  import { s as o } from "../ProgressBar.module-BkAFfFy0.js";
6
6
  import { computeBoxProps as S, computeBoxClassName as O } from "./Box.js";
@@ -14,12 +14,12 @@ function w(d) {
14
14
  ranges: h = {},
15
15
  children: l,
16
16
  ...t
17
- } = d, a = _(r, u, p), x = l !== void 0, s = C || y(r, h) || "default", e = S(t), c = [
17
+ } = d, a = y(r, u, p), x = l !== void 0, s = C || N(r, h) || "default", e = S(t), c = [
18
18
  o.progressBar,
19
19
  f,
20
20
  O(t)
21
21
  ], i = {
22
- width: B(a) * 100 + "%"
22
+ width: _(a) * 100 + "%"
23
23
  };
24
24
  return v.includes(s) || s === "default" ? c.push(o["color__" + s]) : (e.style = { ...e.style, borderColor: s }, i.backgroundColor = s), /* @__PURE__ */ g("div", { className: m(c), ...e, children: [
25
25
  /* @__PURE__ */ n(
@@ -29,7 +29,7 @@ function w(d) {
29
29
  style: i
30
30
  }
31
31
  ),
32
- /* @__PURE__ */ n("div", { className: o.content, children: x ? l : N(a * 100) + "%" })
32
+ /* @__PURE__ */ n("div", { className: o.content, children: x ? l : B(a * 100) + "%" })
33
33
  ] });
34
34
  }
35
35
  export {
@@ -1,5 +1,5 @@
1
1
  import { jsxs as k, jsx as _ } from "react/jsx-runtime";
2
- import { scale as d, keyOfMatchingRange as M, clamp01 as N } from "../common/math.js";
2
+ import { scale as d, clamp01 as M, keyOfMatchingRange as N } from "../common/math.js";
3
3
  import { classes as u } from "../common/react.js";
4
4
  import { AnimatedNumber as A } from "./AnimatedNumber.js";
5
5
  import { Box as B, computeBoxClassName as G, computeBoxProps as j } from "./Box.js";
@@ -65,7 +65,7 @@ function A_(y) {
65
65
  style: w,
66
66
  value: l,
67
67
  ...m
68
- } = y, C = d(l, s, n), p = N(C), c = a ? {} : { primary: [0, 1] };
68
+ } = y, C = d(l, s, n), p = M(C), c = a ? {} : { primary: [0, 1] };
69
69
  a && Object.keys(a).forEach((t) => {
70
70
  const g = a[t];
71
71
  c[t] = [
@@ -76,7 +76,7 @@ function A_(y) {
76
76
  function x() {
77
77
  return o && r && l > o && l < r || o && l > o ? !0 : !!(r && l < r);
78
78
  }
79
- const b = x() && M(p, c);
79
+ const b = x() && N(p, c);
80
80
  return /* @__PURE__ */ k(B, { inline: !0, children: [
81
81
  /* @__PURE__ */ _(
82
82
  "div",
@@ -48,7 +48,7 @@ export declare const Section: import('react').ForwardRefExoticComponent<Partial<
48
48
  as: string;
49
49
  children: ReactNode;
50
50
  className: string | import('../common/react').BooleanLike;
51
- style: Partial<CSSStyleDeclaration>;
51
+ style: import('react').CSSProperties;
52
52
  }> & Partial<Record<"bold" | "italic" | "nowrap" | "fillPositionedParent" | "inline" | "preserveWhitespace", boolean>> & Partial<Record<"fontWeight" | "textAlign" | "bottom" | "fontFamily" | "fontSize" | "height" | "left" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "overflow" | "overflowX" | "overflowY" | "position" | "right" | "top" | "verticalAlign" | "width" | "color" | "backgroundColor" | "align" | "lineHeight" | "m" | "mb" | "ml" | "mr" | "mt" | "mx" | "my" | "p" | "pb" | "pl" | "pr" | "pt" | "px" | "py" | "textColor", string | import('../common/react').BooleanLike>> & Partial<{
53
53
  onClick: import('react').MouseEventHandler<HTMLDivElement>;
54
54
  onContextMenu: import('react').MouseEventHandler<HTMLDivElement>;
@@ -1,7 +1,7 @@
1
1
  import { jsxs as r, jsx as s } from "react/jsx-runtime";
2
2
  import { forwardRef as S, useEffect as j } from "react";
3
3
  import { addScrollableNode as z, removeScrollableNode as B } from "../common/events.js";
4
- import { classes as H, canRender as m } from "../common/react.js";
4
+ import { canRender as m, classes as H } from "../common/react.js";
5
5
  import { s as t } from "../Section.module-CLVHJ4yA.js";
6
6
  import { computeBoxClassName as T, computeBoxProps as y } from "./Box.js";
7
7
  const q = S(
@@ -1,5 +1,5 @@
1
1
  import { jsx as s, jsxs as m } from "react/jsx-runtime";
2
- import { keyOfMatchingRange as R, clamp01 as t, scale as f } from "../common/math.js";
2
+ import { scale as f, keyOfMatchingRange as R, clamp01 as t } from "../common/math.js";
3
3
  import { classes as _ } from "../common/react.js";
4
4
  import { s as e } from "../ProgressBar.module-BkAFfFy0.js";
5
5
  import { computeBoxClassName as $, computeBoxProps as q } from "./Box.js";
@@ -24,7 +24,7 @@ export declare const TextArea: import('react').ForwardRefExoticComponent<Partial
24
24
  as: string;
25
25
  children: import('react').ReactNode;
26
26
  className: string | import('../common/react').BooleanLike;
27
- style: Partial<CSSStyleDeclaration>;
27
+ style: import('react').CSSProperties;
28
28
  }> & Partial<Record<"bold" | "italic" | "nowrap" | "fillPositionedParent" | "inline" | "preserveWhitespace", boolean>> & Partial<Record<"fontWeight" | "textAlign" | "bottom" | "fontFamily" | "fontSize" | "height" | "left" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "overflow" | "overflowX" | "overflowY" | "position" | "right" | "top" | "verticalAlign" | "width" | "color" | "backgroundColor" | "align" | "lineHeight" | "m" | "mb" | "ml" | "mr" | "mt" | "mx" | "my" | "p" | "pb" | "pl" | "pr" | "pt" | "px" | "py" | "textColor", string | import('../common/react').BooleanLike>> & Partial<{
29
29
  onClick: import('react').MouseEventHandler<HTMLDivElement>;
30
30
  onContextMenu: import('react').MouseEventHandler<HTMLDivElement>;
@@ -1,15 +1,19 @@
1
1
  import { createPopper, Placement, VirtualElement } from '@popperjs/core';
2
2
  import { Component, ReactNode } from 'react';
3
3
 
4
- type TooltipProps = {
5
- children?: ReactNode;
4
+ type Props = {
5
+ /** The content to display in the tooltip */
6
6
  content: ReactNode;
7
- position?: Placement;
8
- };
9
- type TooltipState = {
7
+ } & Partial<{
8
+ /** Hovering this element will show the tooltip */
9
+ children: ReactNode;
10
+ /** Where to place the tooltip relative to the reference element */
11
+ position: Placement;
12
+ }>;
13
+ type State = {
10
14
  hovered: boolean;
11
15
  };
12
- export declare class Tooltip extends Component<TooltipProps, TooltipState> {
16
+ export declare class Tooltip extends Component<Props, State> {
13
17
  static renderedTooltip: HTMLDivElement | undefined;
14
18
  static singletonPopper: ReturnType<typeof createPopper> | undefined;
15
19
  static currentHoveredElement: Element | undefined;
@@ -2,9 +2,9 @@ import '../assets/Tooltip.css';var s = Object.defineProperty;
2
2
  var p = (o, e, n) => e in o ? s(o, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : o[e] = n;
3
3
  var r = (o, e, n) => p(o, typeof e != "symbol" ? e + "" : e, n);
4
4
  import { jsx as l } from "react/jsx-runtime";
5
- import { Component as c } from "react";
6
- import { findDOMNode as m, render as a } from "react-dom";
7
- import { c as u } from "../popper-CiqSDJTE.js";
5
+ import { c } from "../index-jLZg_duJ.js";
6
+ import { Component as m } from "react";
7
+ import { findDOMNode as a, render as u } from "react-dom";
8
8
  const h = "_tooltip_1pib4_13", f = {
9
9
  tooltip: h
10
10
  }, i = {
@@ -24,9 +24,9 @@ const h = "_tooltip_1pib4_13", f = {
24
24
  x: 0,
25
25
  y: 0,
26
26
  toJSON: () => null
27
- }, t = class t extends c {
27
+ }, t = class t extends m {
28
28
  getDOMNode() {
29
- return m(this);
29
+ return a(this);
30
30
  }
31
31
  componentDidMount() {
32
32
  const e = this.getDOMNode();
@@ -42,9 +42,9 @@ const h = "_tooltip_1pib4_13", f = {
42
42
  }
43
43
  renderPopperContent() {
44
44
  const e = t.renderedTooltip;
45
- e && a(/* @__PURE__ */ l("span", { children: this.props.content }), e, () => {
45
+ e && u(/* @__PURE__ */ l("span", { children: this.props.content }), e, () => {
46
46
  let n = t.singletonPopper;
47
- n === void 0 ? (n = u(
47
+ n === void 0 ? (n = c(
48
48
  t.virtualElement,
49
49
  e,
50
50
  {