@elcrm/tooltip 0.0.1
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/README.md +0 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.es.js +716 -0
- package/dist/index.umd.js +31 -0
- package/package.json +34 -0
package/README.md
ADDED
|
File without changes
|
package/dist/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--tooltip-background: #28292d;--tooltip-color: #ffffff94;--tooltip-radius: 15px}._t_15niz_7{position:fixed;z-index:99;opacity:0;background:var(--tooltip-background);color:var(--tooltip-color);display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:.5rem;border-radius:var(--tooltip-radius);padding:10px;max-width:300px;font-size:14px;margin-inline:10px;width:min-content!important}._t_15niz_7:before{content:"";position:fixed;pointer-events:none;top:var(--tooltip-arrow-y);left:var(--tooltip-arrow-x);margin-left:-8px;border-width:8px;border-style:solid;border-color:#28292d transparent transparent transparent}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type TTooltipText = {
|
|
2
|
+
content: string | JSX.Element;
|
|
3
|
+
children?: string | JSX.Element;
|
|
4
|
+
className?: string;
|
|
5
|
+
orientation?: "up" | "down" | "left" | "right";
|
|
6
|
+
textAlign?: "center" | "left" | "right";
|
|
7
|
+
dev?: boolean;
|
|
8
|
+
element?: any;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Renders a single tooltip component.
|
|
12
|
+
*
|
|
13
|
+
* The component takes care of positioning itself relative to the given
|
|
14
|
+
* `position` object. The `orientation` prop can be set to one of the
|
|
15
|
+
* following values: `"up"`, `"down"`, `"left"`, `"right"`.
|
|
16
|
+
*
|
|
17
|
+
* The `update` prop is used to trigger a re-render of the component.
|
|
18
|
+
* The `textAlign` prop is used to set the text alignment of the tooltip
|
|
19
|
+
* content.
|
|
20
|
+
*
|
|
21
|
+
* @param {Object} props
|
|
22
|
+
* @param {string|JSX.Element} props.content - The content of the tooltip.
|
|
23
|
+
* @param {{top: number, left: number, width: number, height: number}} props.position - The position of the element that the tooltip is attached to.
|
|
24
|
+
* @param {"up"|"down"|"left"|"right"} [props.orientation="up"] - The orientation of the tooltip.
|
|
25
|
+
* @param {number} [props.update=0] - A number that triggers a re-render of the component when changed.
|
|
26
|
+
* @param {"center"|"left"|"right"} [props.textAlign="center"] - The text alignment of the tooltip content.
|
|
27
|
+
* @returns {JSX.Element} A React element that displays the tooltip content.
|
|
28
|
+
*/
|
|
29
|
+
export declare const Item: ({ content, position, orientation, update, textAlign, }: any) => JSX.Element;
|
|
30
|
+
export declare const Tooltip: ({ content, children, className, textAlign, orientation, dev, ...props }: TTooltipText) => import("react/jsx-runtime").JSX.Element;
|
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,716 @@
|
|
|
1
|
+
import $ from "react";
|
|
2
|
+
import { createPortal as fr } from "react-dom";
|
|
3
|
+
import './index.css';var Z = { exports: {} }, I = {};
|
|
4
|
+
/**
|
|
5
|
+
* @license React
|
|
6
|
+
* react-jsx-runtime.production.min.js
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
9
|
+
*
|
|
10
|
+
* This source code is licensed under the MIT license found in the
|
|
11
|
+
* LICENSE file in the root directory of this source tree.
|
|
12
|
+
*/
|
|
13
|
+
var xe;
|
|
14
|
+
function cr() {
|
|
15
|
+
if (xe) return I;
|
|
16
|
+
xe = 1;
|
|
17
|
+
var w = $, d = Symbol.for("react.element"), O = Symbol.for("react.fragment"), E = Object.prototype.hasOwnProperty, T = w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, m = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
+
function s(p, f, b) {
|
|
19
|
+
var u, R = {}, P = null, Y = null;
|
|
20
|
+
b !== void 0 && (P = "" + b), f.key !== void 0 && (P = "" + f.key), f.ref !== void 0 && (Y = f.ref);
|
|
21
|
+
for (u in f) E.call(f, u) && !m.hasOwnProperty(u) && (R[u] = f[u]);
|
|
22
|
+
if (p && p.defaultProps) for (u in f = p.defaultProps, f) R[u] === void 0 && (R[u] = f[u]);
|
|
23
|
+
return { $$typeof: d, type: p, key: P, ref: Y, props: R, _owner: T.current };
|
|
24
|
+
}
|
|
25
|
+
return I.Fragment = O, I.jsx = s, I.jsxs = s, I;
|
|
26
|
+
}
|
|
27
|
+
var W = {};
|
|
28
|
+
/**
|
|
29
|
+
* @license React
|
|
30
|
+
* react-jsx-runtime.development.js
|
|
31
|
+
*
|
|
32
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the MIT license found in the
|
|
35
|
+
* LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/
|
|
37
|
+
var Oe;
|
|
38
|
+
function dr() {
|
|
39
|
+
return Oe || (Oe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
40
|
+
var w = $, d = Symbol.for("react.element"), O = Symbol.for("react.portal"), E = Symbol.for("react.fragment"), T = Symbol.for("react.strict_mode"), m = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), p = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), Q = Symbol.iterator, Pe = "@@iterator";
|
|
41
|
+
function Ce(e) {
|
|
42
|
+
if (e === null || typeof e != "object")
|
|
43
|
+
return null;
|
|
44
|
+
var r = Q && e[Q] || e[Pe];
|
|
45
|
+
return typeof r == "function" ? r : null;
|
|
46
|
+
}
|
|
47
|
+
var j = w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
48
|
+
function y(e) {
|
|
49
|
+
{
|
|
50
|
+
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
51
|
+
t[n - 1] = arguments[n];
|
|
52
|
+
Se("error", e, t);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function Se(e, r, t) {
|
|
56
|
+
{
|
|
57
|
+
var n = j.ReactDebugCurrentFrame, i = n.getStackAddendum();
|
|
58
|
+
i !== "" && (r += "%s", t = t.concat([i]));
|
|
59
|
+
var l = t.map(function(o) {
|
|
60
|
+
return String(o);
|
|
61
|
+
});
|
|
62
|
+
l.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, l);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
var je = !1, ke = !1, De = !1, Fe = !1, Ae = !1, ee;
|
|
66
|
+
ee = Symbol.for("react.module.reference");
|
|
67
|
+
function Ie(e) {
|
|
68
|
+
return !!(typeof e == "string" || typeof e == "function" || e === E || e === m || Ae || e === T || e === b || e === u || Fe || e === Y || je || ke || De || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === R || e.$$typeof === s || e.$$typeof === p || e.$$typeof === f || // This needs to include all possible module reference object
|
|
69
|
+
// types supported by any Flight configuration anywhere since
|
|
70
|
+
// we don't know which Flight build this will end up being used
|
|
71
|
+
// with.
|
|
72
|
+
e.$$typeof === ee || e.getModuleId !== void 0));
|
|
73
|
+
}
|
|
74
|
+
function We(e, r, t) {
|
|
75
|
+
var n = e.displayName;
|
|
76
|
+
if (n)
|
|
77
|
+
return n;
|
|
78
|
+
var i = r.displayName || r.name || "";
|
|
79
|
+
return i !== "" ? t + "(" + i + ")" : t;
|
|
80
|
+
}
|
|
81
|
+
function re(e) {
|
|
82
|
+
return e.displayName || "Context";
|
|
83
|
+
}
|
|
84
|
+
function x(e) {
|
|
85
|
+
if (e == null)
|
|
86
|
+
return null;
|
|
87
|
+
if (typeof e.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
88
|
+
return e.displayName || e.name || null;
|
|
89
|
+
if (typeof e == "string")
|
|
90
|
+
return e;
|
|
91
|
+
switch (e) {
|
|
92
|
+
case E:
|
|
93
|
+
return "Fragment";
|
|
94
|
+
case O:
|
|
95
|
+
return "Portal";
|
|
96
|
+
case m:
|
|
97
|
+
return "Profiler";
|
|
98
|
+
case T:
|
|
99
|
+
return "StrictMode";
|
|
100
|
+
case b:
|
|
101
|
+
return "Suspense";
|
|
102
|
+
case u:
|
|
103
|
+
return "SuspenseList";
|
|
104
|
+
}
|
|
105
|
+
if (typeof e == "object")
|
|
106
|
+
switch (e.$$typeof) {
|
|
107
|
+
case p:
|
|
108
|
+
var r = e;
|
|
109
|
+
return re(r) + ".Consumer";
|
|
110
|
+
case s:
|
|
111
|
+
var t = e;
|
|
112
|
+
return re(t._context) + ".Provider";
|
|
113
|
+
case f:
|
|
114
|
+
return We(e, e.render, "ForwardRef");
|
|
115
|
+
case R:
|
|
116
|
+
var n = e.displayName || null;
|
|
117
|
+
return n !== null ? n : x(e.type) || "Memo";
|
|
118
|
+
case P: {
|
|
119
|
+
var i = e, l = i._payload, o = i._init;
|
|
120
|
+
try {
|
|
121
|
+
return x(o(l));
|
|
122
|
+
} catch {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
var C = Object.assign, F = 0, te, ne, ae, oe, ie, ue, se;
|
|
130
|
+
function le() {
|
|
131
|
+
}
|
|
132
|
+
le.__reactDisabledLog = !0;
|
|
133
|
+
function $e() {
|
|
134
|
+
{
|
|
135
|
+
if (F === 0) {
|
|
136
|
+
te = console.log, ne = console.info, ae = console.warn, oe = console.error, ie = console.group, ue = console.groupCollapsed, se = console.groupEnd;
|
|
137
|
+
var e = {
|
|
138
|
+
configurable: !0,
|
|
139
|
+
enumerable: !0,
|
|
140
|
+
value: le,
|
|
141
|
+
writable: !0
|
|
142
|
+
};
|
|
143
|
+
Object.defineProperties(console, {
|
|
144
|
+
info: e,
|
|
145
|
+
log: e,
|
|
146
|
+
warn: e,
|
|
147
|
+
error: e,
|
|
148
|
+
group: e,
|
|
149
|
+
groupCollapsed: e,
|
|
150
|
+
groupEnd: e
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
F++;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
function Ye() {
|
|
157
|
+
{
|
|
158
|
+
if (F--, F === 0) {
|
|
159
|
+
var e = {
|
|
160
|
+
configurable: !0,
|
|
161
|
+
enumerable: !0,
|
|
162
|
+
writable: !0
|
|
163
|
+
};
|
|
164
|
+
Object.defineProperties(console, {
|
|
165
|
+
log: C({}, e, {
|
|
166
|
+
value: te
|
|
167
|
+
}),
|
|
168
|
+
info: C({}, e, {
|
|
169
|
+
value: ne
|
|
170
|
+
}),
|
|
171
|
+
warn: C({}, e, {
|
|
172
|
+
value: ae
|
|
173
|
+
}),
|
|
174
|
+
error: C({}, e, {
|
|
175
|
+
value: oe
|
|
176
|
+
}),
|
|
177
|
+
group: C({}, e, {
|
|
178
|
+
value: ie
|
|
179
|
+
}),
|
|
180
|
+
groupCollapsed: C({}, e, {
|
|
181
|
+
value: ue
|
|
182
|
+
}),
|
|
183
|
+
groupEnd: C({}, e, {
|
|
184
|
+
value: se
|
|
185
|
+
})
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
F < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
var B = j.ReactCurrentDispatcher, J;
|
|
192
|
+
function M(e, r, t) {
|
|
193
|
+
{
|
|
194
|
+
if (J === void 0)
|
|
195
|
+
try {
|
|
196
|
+
throw Error();
|
|
197
|
+
} catch (i) {
|
|
198
|
+
var n = i.stack.trim().match(/\n( *(at )?)/);
|
|
199
|
+
J = n && n[1] || "";
|
|
200
|
+
}
|
|
201
|
+
return `
|
|
202
|
+
` + J + e;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
var K = !1, L;
|
|
206
|
+
{
|
|
207
|
+
var Me = typeof WeakMap == "function" ? WeakMap : Map;
|
|
208
|
+
L = new Me();
|
|
209
|
+
}
|
|
210
|
+
function fe(e, r) {
|
|
211
|
+
if (!e || K)
|
|
212
|
+
return "";
|
|
213
|
+
{
|
|
214
|
+
var t = L.get(e);
|
|
215
|
+
if (t !== void 0)
|
|
216
|
+
return t;
|
|
217
|
+
}
|
|
218
|
+
var n;
|
|
219
|
+
K = !0;
|
|
220
|
+
var i = Error.prepareStackTrace;
|
|
221
|
+
Error.prepareStackTrace = void 0;
|
|
222
|
+
var l;
|
|
223
|
+
l = B.current, B.current = null, $e();
|
|
224
|
+
try {
|
|
225
|
+
if (r) {
|
|
226
|
+
var o = function() {
|
|
227
|
+
throw Error();
|
|
228
|
+
};
|
|
229
|
+
if (Object.defineProperty(o.prototype, "props", {
|
|
230
|
+
set: function() {
|
|
231
|
+
throw Error();
|
|
232
|
+
}
|
|
233
|
+
}), typeof Reflect == "object" && Reflect.construct) {
|
|
234
|
+
try {
|
|
235
|
+
Reflect.construct(o, []);
|
|
236
|
+
} catch (g) {
|
|
237
|
+
n = g;
|
|
238
|
+
}
|
|
239
|
+
Reflect.construct(e, [], o);
|
|
240
|
+
} else {
|
|
241
|
+
try {
|
|
242
|
+
o.call();
|
|
243
|
+
} catch (g) {
|
|
244
|
+
n = g;
|
|
245
|
+
}
|
|
246
|
+
e.call(o.prototype);
|
|
247
|
+
}
|
|
248
|
+
} else {
|
|
249
|
+
try {
|
|
250
|
+
throw Error();
|
|
251
|
+
} catch (g) {
|
|
252
|
+
n = g;
|
|
253
|
+
}
|
|
254
|
+
e();
|
|
255
|
+
}
|
|
256
|
+
} catch (g) {
|
|
257
|
+
if (g && n && typeof g.stack == "string") {
|
|
258
|
+
for (var a = g.stack.split(`
|
|
259
|
+
`), h = n.stack.split(`
|
|
260
|
+
`), c = a.length - 1, v = h.length - 1; c >= 1 && v >= 0 && a[c] !== h[v]; )
|
|
261
|
+
v--;
|
|
262
|
+
for (; c >= 1 && v >= 0; c--, v--)
|
|
263
|
+
if (a[c] !== h[v]) {
|
|
264
|
+
if (c !== 1 || v !== 1)
|
|
265
|
+
do
|
|
266
|
+
if (c--, v--, v < 0 || a[c] !== h[v]) {
|
|
267
|
+
var _ = `
|
|
268
|
+
` + a[c].replace(" at new ", " at ");
|
|
269
|
+
return e.displayName && _.includes("<anonymous>") && (_ = _.replace("<anonymous>", e.displayName)), typeof e == "function" && L.set(e, _), _;
|
|
270
|
+
}
|
|
271
|
+
while (c >= 1 && v >= 0);
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
} finally {
|
|
276
|
+
K = !1, B.current = l, Ye(), Error.prepareStackTrace = i;
|
|
277
|
+
}
|
|
278
|
+
var D = e ? e.displayName || e.name : "", S = D ? M(D) : "";
|
|
279
|
+
return typeof e == "function" && L.set(e, S), S;
|
|
280
|
+
}
|
|
281
|
+
function Le(e, r, t) {
|
|
282
|
+
return fe(e, !1);
|
|
283
|
+
}
|
|
284
|
+
function Ve(e) {
|
|
285
|
+
var r = e.prototype;
|
|
286
|
+
return !!(r && r.isReactComponent);
|
|
287
|
+
}
|
|
288
|
+
function V(e, r, t) {
|
|
289
|
+
if (e == null)
|
|
290
|
+
return "";
|
|
291
|
+
if (typeof e == "function")
|
|
292
|
+
return fe(e, Ve(e));
|
|
293
|
+
if (typeof e == "string")
|
|
294
|
+
return M(e);
|
|
295
|
+
switch (e) {
|
|
296
|
+
case b:
|
|
297
|
+
return M("Suspense");
|
|
298
|
+
case u:
|
|
299
|
+
return M("SuspenseList");
|
|
300
|
+
}
|
|
301
|
+
if (typeof e == "object")
|
|
302
|
+
switch (e.$$typeof) {
|
|
303
|
+
case f:
|
|
304
|
+
return Le(e.render);
|
|
305
|
+
case R:
|
|
306
|
+
return V(e.type, r, t);
|
|
307
|
+
case P: {
|
|
308
|
+
var n = e, i = n._payload, l = n._init;
|
|
309
|
+
try {
|
|
310
|
+
return V(l(i), r, t);
|
|
311
|
+
} catch {
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
return "";
|
|
316
|
+
}
|
|
317
|
+
var A = Object.prototype.hasOwnProperty, ce = {}, de = j.ReactDebugCurrentFrame;
|
|
318
|
+
function U(e) {
|
|
319
|
+
if (e) {
|
|
320
|
+
var r = e._owner, t = V(e.type, e._source, r ? r.type : null);
|
|
321
|
+
de.setExtraStackFrame(t);
|
|
322
|
+
} else
|
|
323
|
+
de.setExtraStackFrame(null);
|
|
324
|
+
}
|
|
325
|
+
function Ue(e, r, t, n, i) {
|
|
326
|
+
{
|
|
327
|
+
var l = Function.call.bind(A);
|
|
328
|
+
for (var o in e)
|
|
329
|
+
if (l(e, o)) {
|
|
330
|
+
var a = void 0;
|
|
331
|
+
try {
|
|
332
|
+
if (typeof e[o] != "function") {
|
|
333
|
+
var h = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
334
|
+
throw h.name = "Invariant Violation", h;
|
|
335
|
+
}
|
|
336
|
+
a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
337
|
+
} catch (c) {
|
|
338
|
+
a = c;
|
|
339
|
+
}
|
|
340
|
+
a && !(a instanceof Error) && (U(i), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, o, typeof a), U(null)), a instanceof Error && !(a.message in ce) && (ce[a.message] = !0, U(i), y("Failed %s type: %s", t, a.message), U(null));
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
var Ne = Array.isArray;
|
|
345
|
+
function q(e) {
|
|
346
|
+
return Ne(e);
|
|
347
|
+
}
|
|
348
|
+
function Be(e) {
|
|
349
|
+
{
|
|
350
|
+
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
351
|
+
return t;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
function Je(e) {
|
|
355
|
+
try {
|
|
356
|
+
return ve(e), !1;
|
|
357
|
+
} catch {
|
|
358
|
+
return !0;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
function ve(e) {
|
|
362
|
+
return "" + e;
|
|
363
|
+
}
|
|
364
|
+
function pe(e) {
|
|
365
|
+
if (Je(e))
|
|
366
|
+
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Be(e)), ve(e);
|
|
367
|
+
}
|
|
368
|
+
var ye = j.ReactCurrentOwner, Ke = {
|
|
369
|
+
key: !0,
|
|
370
|
+
ref: !0,
|
|
371
|
+
__self: !0,
|
|
372
|
+
__source: !0
|
|
373
|
+
}, he, ge;
|
|
374
|
+
function qe(e) {
|
|
375
|
+
if (A.call(e, "ref")) {
|
|
376
|
+
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
377
|
+
if (r && r.isReactWarning)
|
|
378
|
+
return !1;
|
|
379
|
+
}
|
|
380
|
+
return e.ref !== void 0;
|
|
381
|
+
}
|
|
382
|
+
function ze(e) {
|
|
383
|
+
if (A.call(e, "key")) {
|
|
384
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
385
|
+
if (r && r.isReactWarning)
|
|
386
|
+
return !1;
|
|
387
|
+
}
|
|
388
|
+
return e.key !== void 0;
|
|
389
|
+
}
|
|
390
|
+
function Ge(e, r) {
|
|
391
|
+
typeof e.ref == "string" && ye.current;
|
|
392
|
+
}
|
|
393
|
+
function Xe(e, r) {
|
|
394
|
+
{
|
|
395
|
+
var t = function() {
|
|
396
|
+
he || (he = !0, y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
397
|
+
};
|
|
398
|
+
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
399
|
+
get: t,
|
|
400
|
+
configurable: !0
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
function He(e, r) {
|
|
405
|
+
{
|
|
406
|
+
var t = function() {
|
|
407
|
+
ge || (ge = !0, y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
408
|
+
};
|
|
409
|
+
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
410
|
+
get: t,
|
|
411
|
+
configurable: !0
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
var Ze = function(e, r, t, n, i, l, o) {
|
|
416
|
+
var a = {
|
|
417
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
418
|
+
$$typeof: d,
|
|
419
|
+
// Built-in properties that belong on the element
|
|
420
|
+
type: e,
|
|
421
|
+
key: r,
|
|
422
|
+
ref: t,
|
|
423
|
+
props: o,
|
|
424
|
+
// Record the component responsible for creating this element.
|
|
425
|
+
_owner: l
|
|
426
|
+
};
|
|
427
|
+
return a._store = {}, Object.defineProperty(a._store, "validated", {
|
|
428
|
+
configurable: !1,
|
|
429
|
+
enumerable: !1,
|
|
430
|
+
writable: !0,
|
|
431
|
+
value: !1
|
|
432
|
+
}), Object.defineProperty(a, "_self", {
|
|
433
|
+
configurable: !1,
|
|
434
|
+
enumerable: !1,
|
|
435
|
+
writable: !1,
|
|
436
|
+
value: n
|
|
437
|
+
}), Object.defineProperty(a, "_source", {
|
|
438
|
+
configurable: !1,
|
|
439
|
+
enumerable: !1,
|
|
440
|
+
writable: !1,
|
|
441
|
+
value: i
|
|
442
|
+
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
|
|
443
|
+
};
|
|
444
|
+
function Qe(e, r, t, n, i) {
|
|
445
|
+
{
|
|
446
|
+
var l, o = {}, a = null, h = null;
|
|
447
|
+
t !== void 0 && (pe(t), a = "" + t), ze(r) && (pe(r.key), a = "" + r.key), qe(r) && (h = r.ref, Ge(r, i));
|
|
448
|
+
for (l in r)
|
|
449
|
+
A.call(r, l) && !Ke.hasOwnProperty(l) && (o[l] = r[l]);
|
|
450
|
+
if (e && e.defaultProps) {
|
|
451
|
+
var c = e.defaultProps;
|
|
452
|
+
for (l in c)
|
|
453
|
+
o[l] === void 0 && (o[l] = c[l]);
|
|
454
|
+
}
|
|
455
|
+
if (a || h) {
|
|
456
|
+
var v = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
457
|
+
a && Xe(o, v), h && He(o, v);
|
|
458
|
+
}
|
|
459
|
+
return Ze(e, a, h, i, n, ye.current, o);
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
var z = j.ReactCurrentOwner, be = j.ReactDebugCurrentFrame;
|
|
463
|
+
function k(e) {
|
|
464
|
+
if (e) {
|
|
465
|
+
var r = e._owner, t = V(e.type, e._source, r ? r.type : null);
|
|
466
|
+
be.setExtraStackFrame(t);
|
|
467
|
+
} else
|
|
468
|
+
be.setExtraStackFrame(null);
|
|
469
|
+
}
|
|
470
|
+
var G;
|
|
471
|
+
G = !1;
|
|
472
|
+
function X(e) {
|
|
473
|
+
return typeof e == "object" && e !== null && e.$$typeof === d;
|
|
474
|
+
}
|
|
475
|
+
function _e() {
|
|
476
|
+
{
|
|
477
|
+
if (z.current) {
|
|
478
|
+
var e = x(z.current.type);
|
|
479
|
+
if (e)
|
|
480
|
+
return `
|
|
481
|
+
|
|
482
|
+
Check the render method of \`` + e + "`.";
|
|
483
|
+
}
|
|
484
|
+
return "";
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
function er(e) {
|
|
488
|
+
return "";
|
|
489
|
+
}
|
|
490
|
+
var Ee = {};
|
|
491
|
+
function rr(e) {
|
|
492
|
+
{
|
|
493
|
+
var r = _e();
|
|
494
|
+
if (!r) {
|
|
495
|
+
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
496
|
+
t && (r = `
|
|
497
|
+
|
|
498
|
+
Check the top-level render call using <` + t + ">.");
|
|
499
|
+
}
|
|
500
|
+
return r;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
function Re(e, r) {
|
|
504
|
+
{
|
|
505
|
+
if (!e._store || e._store.validated || e.key != null)
|
|
506
|
+
return;
|
|
507
|
+
e._store.validated = !0;
|
|
508
|
+
var t = rr(r);
|
|
509
|
+
if (Ee[t])
|
|
510
|
+
return;
|
|
511
|
+
Ee[t] = !0;
|
|
512
|
+
var n = "";
|
|
513
|
+
e && e._owner && e._owner !== z.current && (n = " It was passed a child from " + x(e._owner.type) + "."), k(e), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), k(null);
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
function me(e, r) {
|
|
517
|
+
{
|
|
518
|
+
if (typeof e != "object")
|
|
519
|
+
return;
|
|
520
|
+
if (q(e))
|
|
521
|
+
for (var t = 0; t < e.length; t++) {
|
|
522
|
+
var n = e[t];
|
|
523
|
+
X(n) && Re(n, r);
|
|
524
|
+
}
|
|
525
|
+
else if (X(e))
|
|
526
|
+
e._store && (e._store.validated = !0);
|
|
527
|
+
else if (e) {
|
|
528
|
+
var i = Ce(e);
|
|
529
|
+
if (typeof i == "function" && i !== e.entries)
|
|
530
|
+
for (var l = i.call(e), o; !(o = l.next()).done; )
|
|
531
|
+
X(o.value) && Re(o.value, r);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
function tr(e) {
|
|
536
|
+
{
|
|
537
|
+
var r = e.type;
|
|
538
|
+
if (r == null || typeof r == "string")
|
|
539
|
+
return;
|
|
540
|
+
var t;
|
|
541
|
+
if (typeof r == "function")
|
|
542
|
+
t = r.propTypes;
|
|
543
|
+
else if (typeof r == "object" && (r.$$typeof === f || // Note: Memo only checks outer props here.
|
|
544
|
+
// Inner props are checked in the reconciler.
|
|
545
|
+
r.$$typeof === R))
|
|
546
|
+
t = r.propTypes;
|
|
547
|
+
else
|
|
548
|
+
return;
|
|
549
|
+
if (t) {
|
|
550
|
+
var n = x(r);
|
|
551
|
+
Ue(t, e.props, "prop", n, e);
|
|
552
|
+
} else if (r.PropTypes !== void 0 && !G) {
|
|
553
|
+
G = !0;
|
|
554
|
+
var i = x(r);
|
|
555
|
+
y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
|
|
556
|
+
}
|
|
557
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
function nr(e) {
|
|
561
|
+
{
|
|
562
|
+
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
563
|
+
var n = r[t];
|
|
564
|
+
if (n !== "children" && n !== "key") {
|
|
565
|
+
k(e), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), k(null);
|
|
566
|
+
break;
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
e.ref !== null && (k(e), y("Invalid attribute `ref` supplied to `React.Fragment`."), k(null));
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
var we = {};
|
|
573
|
+
function Te(e, r, t, n, i, l) {
|
|
574
|
+
{
|
|
575
|
+
var o = Ie(e);
|
|
576
|
+
if (!o) {
|
|
577
|
+
var a = "";
|
|
578
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
579
|
+
var h = er();
|
|
580
|
+
h ? a += h : a += _e();
|
|
581
|
+
var c;
|
|
582
|
+
e === null ? c = "null" : q(e) ? c = "array" : e !== void 0 && e.$$typeof === d ? (c = "<" + (x(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : c = typeof e, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", c, a);
|
|
583
|
+
}
|
|
584
|
+
var v = Qe(e, r, t, i, l);
|
|
585
|
+
if (v == null)
|
|
586
|
+
return v;
|
|
587
|
+
if (o) {
|
|
588
|
+
var _ = r.children;
|
|
589
|
+
if (_ !== void 0)
|
|
590
|
+
if (n)
|
|
591
|
+
if (q(_)) {
|
|
592
|
+
for (var D = 0; D < _.length; D++)
|
|
593
|
+
me(_[D], e);
|
|
594
|
+
Object.freeze && Object.freeze(_);
|
|
595
|
+
} else
|
|
596
|
+
y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
597
|
+
else
|
|
598
|
+
me(_, e);
|
|
599
|
+
}
|
|
600
|
+
if (A.call(r, "key")) {
|
|
601
|
+
var S = x(e), g = Object.keys(r).filter(function(lr) {
|
|
602
|
+
return lr !== "key";
|
|
603
|
+
}), H = g.length > 0 ? "{key: someKey, " + g.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
604
|
+
if (!we[S + H]) {
|
|
605
|
+
var sr = g.length > 0 ? "{" + g.join(": ..., ") + ": ...}" : "{}";
|
|
606
|
+
y(`A props object containing a "key" prop is being spread into JSX:
|
|
607
|
+
let props = %s;
|
|
608
|
+
<%s {...props} />
|
|
609
|
+
React keys must be passed directly to JSX without using spread:
|
|
610
|
+
let props = %s;
|
|
611
|
+
<%s key={someKey} {...props} />`, H, S, sr, S), we[S + H] = !0;
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
return e === E ? nr(v) : tr(v), v;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
function ar(e, r, t) {
|
|
618
|
+
return Te(e, r, t, !0);
|
|
619
|
+
}
|
|
620
|
+
function or(e, r, t) {
|
|
621
|
+
return Te(e, r, t, !1);
|
|
622
|
+
}
|
|
623
|
+
var ir = or, ur = ar;
|
|
624
|
+
W.Fragment = E, W.jsx = ir, W.jsxs = ur;
|
|
625
|
+
}()), W;
|
|
626
|
+
}
|
|
627
|
+
process.env.NODE_ENV === "production" ? Z.exports = cr() : Z.exports = dr();
|
|
628
|
+
var N = Z.exports;
|
|
629
|
+
const vr = "_t_15niz_7", pr = {
|
|
630
|
+
t: vr
|
|
631
|
+
}, yr = ({
|
|
632
|
+
content: w,
|
|
633
|
+
position: d,
|
|
634
|
+
orientation: O = "up",
|
|
635
|
+
update: E,
|
|
636
|
+
textAlign: T
|
|
637
|
+
}) => {
|
|
638
|
+
const m = $.useRef(null);
|
|
639
|
+
return $.useEffect(() => {
|
|
640
|
+
const s = m.current;
|
|
641
|
+
s.style.opacity = "0", s.style.width = "auto", s.style.left = "0px", s.style.top = "0px";
|
|
642
|
+
let p = {
|
|
643
|
+
x: 0,
|
|
644
|
+
y: 0
|
|
645
|
+
};
|
|
646
|
+
const f = s.getBoundingClientRect();
|
|
647
|
+
let b = d.width / 2;
|
|
648
|
+
s.style.width = f.width + "px";
|
|
649
|
+
let u = 0;
|
|
650
|
+
switch (O) {
|
|
651
|
+
case "up":
|
|
652
|
+
u = d.left + b - f.width / 2 - 10, u = window.innerWidth < u + f.width ? window.innerWidth - f.width - 20 : u, u = u < 0 ? 0 : u, s.style.left = u + "px", s.style.top = d.top - f.height - 10 + "px", p.x = d.left + b, p.y = d.top - 10;
|
|
653
|
+
break;
|
|
654
|
+
case "down":
|
|
655
|
+
u = d.left + b - f.width / 2, u = u < 0 ? 0 : u, s.style.left = u + "px", s.style.top = d.bottom + 10 + "px";
|
|
656
|
+
break;
|
|
657
|
+
case "left":
|
|
658
|
+
s.style.top = d.top + "px", s.style.left = d.left - f.width - d.width + "px";
|
|
659
|
+
break;
|
|
660
|
+
case "right":
|
|
661
|
+
s.style.top = d.top + "px", s.style.left = d.right + "px";
|
|
662
|
+
break;
|
|
663
|
+
}
|
|
664
|
+
s.style.setProperty("--tooltip-arrow-x", p.x + "px"), s.style.setProperty("--tooltip-arrow-y", p.y + "px"), s.style.transition = "opacity 0.3s", s.style.textAlign = T, s.style.opacity = "1";
|
|
665
|
+
}, [E]), /* @__PURE__ */ N.jsx("div", { ref: m, className: pr.t, children: w });
|
|
666
|
+
}, br = ({
|
|
667
|
+
content: w,
|
|
668
|
+
children: d,
|
|
669
|
+
className: O,
|
|
670
|
+
textAlign: E = "center",
|
|
671
|
+
orientation: T = "down",
|
|
672
|
+
dev: m,
|
|
673
|
+
...s
|
|
674
|
+
}) => {
|
|
675
|
+
const [p, f] = $.useState(null), b = (R) => {
|
|
676
|
+
f(p.currentTarget);
|
|
677
|
+
}, u = () => {
|
|
678
|
+
m || f(null);
|
|
679
|
+
};
|
|
680
|
+
return /* @__PURE__ */ N.jsxs(
|
|
681
|
+
"span",
|
|
682
|
+
{
|
|
683
|
+
className: O,
|
|
684
|
+
onMouseOver: b,
|
|
685
|
+
onMouseOut: u,
|
|
686
|
+
children: [
|
|
687
|
+
d,
|
|
688
|
+
p !== null && fr(
|
|
689
|
+
s.element ? /* @__PURE__ */ N.jsx(
|
|
690
|
+
s.element,
|
|
691
|
+
{
|
|
692
|
+
content: w,
|
|
693
|
+
position: p.getBoundingClientRect(),
|
|
694
|
+
textAlign: E,
|
|
695
|
+
update: Date.now()
|
|
696
|
+
}
|
|
697
|
+
) : /* @__PURE__ */ N.jsx(
|
|
698
|
+
yr,
|
|
699
|
+
{
|
|
700
|
+
update: Date.now(),
|
|
701
|
+
orientation: T,
|
|
702
|
+
content: w,
|
|
703
|
+
textAlign: E,
|
|
704
|
+
position: p.getBoundingClientRect()
|
|
705
|
+
}
|
|
706
|
+
),
|
|
707
|
+
document.body
|
|
708
|
+
)
|
|
709
|
+
]
|
|
710
|
+
}
|
|
711
|
+
);
|
|
712
|
+
};
|
|
713
|
+
export {
|
|
714
|
+
yr as Item,
|
|
715
|
+
br as Tooltip
|
|
716
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
(function(m,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],w):(m=typeof globalThis<"u"?globalThis:m||self,w((m.elCRM=m.elCRM||{},m.elCRM.components={}),m.React,m.ReactDOM))})(this,function(m,w,je){"use strict";var ee=document.createElement("style");ee.textContent=`:root{--tooltip-background: #28292d;--tooltip-color: #ffffff94;--tooltip-radius: 15px}._t_15niz_7{position:fixed;z-index:99;opacity:0;background:var(--tooltip-background);color:var(--tooltip-color);display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:.5rem;border-radius:var(--tooltip-radius);padding:10px;max-width:300px;font-size:14px;margin-inline:10px;width:min-content!important}._t_15niz_7:before{content:"";position:fixed;pointer-events:none;top:var(--tooltip-arrow-y);left:var(--tooltip-arrow-x);margin-left:-8px;border-width:8px;border-style:solid;border-color:#28292d transparent transparent transparent}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(ee);var z={exports:{}},I={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react-jsx-runtime.production.min.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var re;function ke(){if(re)return I;re=1;var T=w,d=Symbol.for("react.element"),P=Symbol.for("react.fragment"),E=Object.prototype.hasOwnProperty,O=T.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,x={key:!0,ref:!0,__self:!0,__source:!0};function l(p,f,_){var u,R={},S=null,L=null;_!==void 0&&(S=""+_),f.key!==void 0&&(S=""+f.key),f.ref!==void 0&&(L=f.ref);for(u in f)E.call(f,u)&&!x.hasOwnProperty(u)&&(R[u]=f[u]);if(p&&p.defaultProps)for(u in f=p.defaultProps,f)R[u]===void 0&&(R[u]=f[u]);return{$$typeof:d,type:p,key:S,ref:L,props:R,_owner:O.current}}return I.Fragment=P,I.jsx=l,I.jsxs=l,I}var $={};/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react-jsx-runtime.development.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var te;function De(){return te||(te=1,process.env.NODE_ENV!=="production"&&function(){var T=w,d=Symbol.for("react.element"),P=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),p=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),L=Symbol.for("react.offscreen"),ae=Symbol.iterator,Ie="@@iterator";function $e(e){if(e===null||typeof e!="object")return null;var r=ae&&e[ae]||e[Ie];return typeof r=="function"?r:null}var D=T.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];We("error",e,t)}}function We(e,r,t){{var n=D.ReactDebugCurrentFrame,i=n.getStackAddendum();i!==""&&(r+="%s",t=t.concat([i]));var s=t.map(function(o){return String(o)});s.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,s)}}var Me=!1,Ye=!1,Le=!1,Ve=!1,Ue=!1,oe;oe=Symbol.for("react.module.reference");function Ne(e){return!!(typeof e=="string"||typeof e=="function"||e===E||e===x||Ue||e===O||e===_||e===u||Ve||e===L||Me||Ye||Le||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===R||e.$$typeof===l||e.$$typeof===p||e.$$typeof===f||e.$$typeof===oe||e.getModuleId!==void 0))}function Be(e,r,t){var n=e.displayName;if(n)return n;var i=r.displayName||r.name||"";return i!==""?t+"("+i+")":t}function ie(e){return e.displayName||"Context"}function C(e){if(e==null)return null;if(typeof e.tag=="number"&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case P:return"Portal";case x:return"Profiler";case O:return"StrictMode";case _:return"Suspense";case u:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case p:var r=e;return ie(r)+".Consumer";case l:var t=e;return ie(t._context)+".Provider";case f:return Be(e,e.render,"ForwardRef");case R:var n=e.displayName||null;return n!==null?n:C(e.type)||"Memo";case S:{var i=e,s=i._payload,o=i._init;try{return C(o(s))}catch{return null}}}return null}var j=Object.assign,W=0,ue,le,se,fe,ce,de,ve;function pe(){}pe.__reactDisabledLog=!0;function ze(){{if(W===0){ue=console.log,le=console.info,se=console.warn,fe=console.error,ce=console.group,de=console.groupCollapsed,ve=console.groupEnd;var e={configurable:!0,enumerable:!0,value:pe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}W++}}function qe(){{if(W--,W===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:j({},e,{value:ue}),info:j({},e,{value:le}),warn:j({},e,{value:se}),error:j({},e,{value:fe}),group:j({},e,{value:ce}),groupCollapsed:j({},e,{value:de}),groupEnd:j({},e,{value:ve})})}W<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=D.ReactCurrentDispatcher,J;function V(e,r,t){{if(J===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);J=n&&n[1]||""}return`
|
|
19
|
+
`+J+e}}var K=!1,U;{var Je=typeof WeakMap=="function"?WeakMap:Map;U=new Je}function ye(e,r){if(!e||K)return"";{var t=U.get(e);if(t!==void 0)return t}var n;K=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var s;s=q.current,q.current=null,ze();try{if(r){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(g){n=g}Reflect.construct(e,[],o)}else{try{o.call()}catch(g){n=g}e.call(o.prototype)}}else{try{throw Error()}catch(g){n=g}e()}}catch(g){if(g&&n&&typeof g.stack=="string"){for(var a=g.stack.split(`
|
|
20
|
+
`),h=n.stack.split(`
|
|
21
|
+
`),c=a.length-1,v=h.length-1;c>=1&&v>=0&&a[c]!==h[v];)v--;for(;c>=1&&v>=0;c--,v--)if(a[c]!==h[v]){if(c!==1||v!==1)do if(c--,v--,v<0||a[c]!==h[v]){var b=`
|
|
22
|
+
`+a[c].replace(" at new "," at ");return e.displayName&&b.includes("<anonymous>")&&(b=b.replace("<anonymous>",e.displayName)),typeof e=="function"&&U.set(e,b),b}while(c>=1&&v>=0);break}}}finally{K=!1,q.current=s,qe(),Error.prepareStackTrace=i}var A=e?e.displayName||e.name:"",k=A?V(A):"";return typeof e=="function"&&U.set(e,k),k}function Ke(e,r,t){return ye(e,!1)}function Ge(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function N(e,r,t){if(e==null)return"";if(typeof e=="function")return ye(e,Ge(e));if(typeof e=="string")return V(e);switch(e){case _:return V("Suspense");case u:return V("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case f:return Ke(e.render);case R:return N(e.type,r,t);case S:{var n=e,i=n._payload,s=n._init;try{return N(s(i),r,t)}catch{}}}return""}var M=Object.prototype.hasOwnProperty,he={},ge=D.ReactDebugCurrentFrame;function B(e){if(e){var r=e._owner,t=N(e.type,e._source,r?r.type:null);ge.setExtraStackFrame(t)}else ge.setExtraStackFrame(null)}function Xe(e,r,t,n,i){{var s=Function.call.bind(M);for(var o in e)if(s(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var h=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(c){a=c}a&&!(a instanceof Error)&&(B(i),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,o,typeof a),B(null)),a instanceof Error&&!(a.message in he)&&(he[a.message]=!0,B(i),y("Failed %s type: %s",t,a.message),B(null))}}}var He=Array.isArray;function G(e){return He(e)}function Ze(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Qe(e){try{return _e(e),!1}catch{return!0}}function _e(e){return""+e}function be(e){if(Qe(e))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ze(e)),_e(e)}var me=D.ReactCurrentOwner,er={key:!0,ref:!0,__self:!0,__source:!0},Ee,Re;function rr(e){if(M.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function tr(e){if(M.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function nr(e,r){typeof e.ref=="string"&&me.current}function ar(e,r){{var t=function(){Ee||(Ee=!0,y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function or(e,r){{var t=function(){Re||(Re=!0,y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var ir=function(e,r,t,n,i,s,o){var a={$$typeof:d,type:e,key:r,ref:t,props:o,_owner:s};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function ur(e,r,t,n,i){{var s,o={},a=null,h=null;t!==void 0&&(be(t),a=""+t),tr(r)&&(be(r.key),a=""+r.key),rr(r)&&(h=r.ref,nr(r,i));for(s in r)M.call(r,s)&&!er.hasOwnProperty(s)&&(o[s]=r[s]);if(e&&e.defaultProps){var c=e.defaultProps;for(s in c)o[s]===void 0&&(o[s]=c[s])}if(a||h){var v=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&ar(o,v),h&&or(o,v)}return ir(e,a,h,i,n,me.current,o)}}var X=D.ReactCurrentOwner,we=D.ReactDebugCurrentFrame;function F(e){if(e){var r=e._owner,t=N(e.type,e._source,r?r.type:null);we.setExtraStackFrame(t)}else we.setExtraStackFrame(null)}var H;H=!1;function Z(e){return typeof e=="object"&&e!==null&&e.$$typeof===d}function xe(){{if(X.current){var e=C(X.current.type);if(e)return`
|
|
23
|
+
|
|
24
|
+
Check the render method of \``+e+"`."}return""}}function lr(e){return""}var Te={};function sr(e){{var r=xe();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
25
|
+
|
|
26
|
+
Check the top-level render call using <`+t+">.")}return r}}function Oe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=sr(r);if(Te[t])return;Te[t]=!0;var n="";e&&e._owner&&e._owner!==X.current&&(n=" It was passed a child from "+C(e._owner.type)+"."),F(e),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),F(null)}}function Ce(e,r){{if(typeof e!="object")return;if(G(e))for(var t=0;t<e.length;t++){var n=e[t];Z(n)&&Oe(n,r)}else if(Z(e))e._store&&(e._store.validated=!0);else if(e){var i=$e(e);if(typeof i=="function"&&i!==e.entries)for(var s=i.call(e),o;!(o=s.next()).done;)Z(o.value)&&Oe(o.value,r)}}}function fr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===f||r.$$typeof===R))t=r.propTypes;else return;if(t){var n=C(r);Xe(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!H){H=!0;var i=C(r);y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function cr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){F(e),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),F(null);break}}e.ref!==null&&(F(e),y("Invalid attribute `ref` supplied to `React.Fragment`."),F(null))}}var Pe={};function Se(e,r,t,n,i,s){{var o=Ne(e);if(!o){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var h=lr();h?a+=h:a+=xe();var c;e===null?c="null":G(e)?c="array":e!==void 0&&e.$$typeof===d?(c="<"+(C(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):c=typeof e,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,a)}var v=ur(e,r,t,i,s);if(v==null)return v;if(o){var b=r.children;if(b!==void 0)if(n)if(G(b)){for(var A=0;A<b.length;A++)Ce(b[A],e);Object.freeze&&Object.freeze(b)}else y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ce(b,e)}if(M.call(r,"key")){var k=C(e),g=Object.keys(r).filter(function(gr){return gr!=="key"}),Q=g.length>0?"{key: someKey, "+g.join(": ..., ")+": ...}":"{key: someKey}";if(!Pe[k+Q]){var hr=g.length>0?"{"+g.join(": ..., ")+": ...}":"{}";y(`A props object containing a "key" prop is being spread into JSX:
|
|
27
|
+
let props = %s;
|
|
28
|
+
<%s {...props} />
|
|
29
|
+
React keys must be passed directly to JSX without using spread:
|
|
30
|
+
let props = %s;
|
|
31
|
+
<%s key={someKey} {...props} />`,Q,k,hr,k),Pe[k+Q]=!0}}return e===E?cr(v):fr(v),v}}function dr(e,r,t){return Se(e,r,t,!0)}function vr(e,r,t){return Se(e,r,t,!1)}var pr=vr,yr=dr;$.Fragment=E,$.jsx=pr,$.jsxs=yr}()),$}process.env.NODE_ENV==="production"?z.exports=ke():z.exports=De();var Y=z.exports;const Fe={t:"_t_15niz_7"},ne=({content:T,position:d,orientation:P="up",update:E,textAlign:O})=>{const x=w.useRef(null);return w.useEffect(()=>{const l=x.current;l.style.opacity="0",l.style.width="auto",l.style.left="0px",l.style.top="0px";let p={x:0,y:0};const f=l.getBoundingClientRect();let _=d.width/2;l.style.width=f.width+"px";let u=0;switch(P){case"up":u=d.left+_-f.width/2-10,u=window.innerWidth<u+f.width?window.innerWidth-f.width-20:u,u=u<0?0:u,l.style.left=u+"px",l.style.top=d.top-f.height-10+"px",p.x=d.left+_,p.y=d.top-10;break;case"down":u=d.left+_-f.width/2,u=u<0?0:u,l.style.left=u+"px",l.style.top=d.bottom+10+"px";break;case"left":l.style.top=d.top+"px",l.style.left=d.left-f.width-d.width+"px";break;case"right":l.style.top=d.top+"px",l.style.left=d.right+"px";break}l.style.setProperty("--tooltip-arrow-x",p.x+"px"),l.style.setProperty("--tooltip-arrow-y",p.y+"px"),l.style.transition="opacity 0.3s",l.style.textAlign=O,l.style.opacity="1"},[E]),Y.jsx("div",{ref:x,className:Fe.t,children:T})},Ae=({content:T,children:d,className:P,textAlign:E="center",orientation:O="down",dev:x,...l})=>{const[p,f]=w.useState(null),_=R=>{f(p.currentTarget)},u=()=>{x||f(null)};return Y.jsxs("span",{className:P,onMouseOver:_,onMouseOut:u,children:[d,p!==null&&je.createPortal(l.element?Y.jsx(l.element,{content:T,position:p.getBoundingClientRect(),textAlign:E,update:Date.now()}):Y.jsx(ne,{update:Date.now(),orientation:O,content:T,textAlign:E,position:p.getBoundingClientRect()}),document.body)]})};m.Item=ne,m.Tooltip=Ae,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elcrm/tooltip",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "plugin for elCRM",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"author": "MaSkal <dev@elcrm.online>",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"keywords": [
|
|
12
|
+
"elcrm",
|
|
13
|
+
"state",
|
|
14
|
+
"react"
|
|
15
|
+
],
|
|
16
|
+
"main": "./dist/index.umd.js",
|
|
17
|
+
"module": "./dist/index.es.js",
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"import": "./dist/index.es.js",
|
|
23
|
+
"require": "./dist/index.umd.js"
|
|
24
|
+
},
|
|
25
|
+
"./dist/style.css": {
|
|
26
|
+
"import": "./dist/index.css",
|
|
27
|
+
"require": "./dist/index.css"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"@types/react": ">=18.0.0",
|
|
32
|
+
"react": ">=18.0.0"
|
|
33
|
+
}
|
|
34
|
+
}
|