@elcrm/tooltip 0.0.1 → 0.0.3

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/index.css CHANGED
@@ -1 +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}
1
+ :root{--tooltip-background: #28292d;--tooltip-color: #ffffff94;--tooltip-radius: 15px}._t_bkucs_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_bkucs_7:before{content:"";position:fixed;pointer-events:none;top:var(--tooltip-arrow-y);left:var(--tooltip-arrow-x);transform:var(--tooltip-arrow-r);margin-left:-8px;border-width:8px;border-style:solid;border-color:var(--tooltip-background) transparent transparent transparent}
package/dist/index.es.js CHANGED
@@ -10,19 +10,19 @@ import './index.css';var Z = { exports: {} }, I = {};
10
10
  * This source code is licensed under the MIT license found in the
11
11
  * LICENSE file in the root directory of this source tree.
12
12
  */
13
- var xe;
13
+ var Te;
14
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 };
15
+ if (Te) return I;
16
+ Te = 1;
17
+ var w = $, f = Symbol.for("react.element"), O = Symbol.for("react.fragment"), E = Object.prototype.hasOwnProperty, x = w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, m = { key: !0, ref: !0, __self: !0, __source: !0 };
18
+ function u(c, d, g) {
19
+ var l, R = {}, P = null, Y = null;
20
+ g !== void 0 && (P = "" + g), d.key !== void 0 && (P = "" + d.key), d.ref !== void 0 && (Y = d.ref);
21
+ for (l in d) E.call(d, l) && !m.hasOwnProperty(l) && (R[l] = d[l]);
22
+ if (c && c.defaultProps) for (l in d = c.defaultProps, d) R[l] === void 0 && (R[l] = d[l]);
23
+ return { $$typeof: f, type: c, key: P, ref: Y, props: R, _owner: x.current };
24
24
  }
25
- return I.Fragment = O, I.jsx = s, I.jsxs = s, I;
25
+ return I.Fragment = O, I.jsx = u, I.jsxs = u, I;
26
26
  }
27
27
  var W = {};
28
28
  /**
@@ -37,7 +37,7 @@ var W = {};
37
37
  var Oe;
38
38
  function dr() {
39
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";
40
+ var w = $, f = Symbol.for("react.element"), O = Symbol.for("react.portal"), E = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), m = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), c = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), l = 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
41
  function Ce(e) {
42
42
  if (e === null || typeof e != "object")
43
43
  return null;
@@ -56,16 +56,16 @@ function dr() {
56
56
  {
57
57
  var n = j.ReactDebugCurrentFrame, i = n.getStackAddendum();
58
58
  i !== "" && (r += "%s", t = t.concat([i]));
59
- var l = t.map(function(o) {
59
+ var s = t.map(function(o) {
60
60
  return String(o);
61
61
  });
62
- l.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, l);
62
+ s.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, s);
63
63
  }
64
64
  }
65
65
  var je = !1, ke = !1, De = !1, Fe = !1, Ae = !1, ee;
66
66
  ee = Symbol.for("react.module.reference");
67
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
68
+ return !!(typeof e == "string" || typeof e == "function" || e === E || e === m || Ae || e === x || e === g || e === l || Fe || e === Y || je || ke || De || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === R || e.$$typeof === u || e.$$typeof === c || e.$$typeof === d || // This needs to include all possible module reference object
69
69
  // types supported by any Flight configuration anywhere since
70
70
  // we don't know which Flight build this will end up being used
71
71
  // with.
@@ -81,7 +81,7 @@ function dr() {
81
81
  function re(e) {
82
82
  return e.displayName || "Context";
83
83
  }
84
- function x(e) {
84
+ function T(e) {
85
85
  if (e == null)
86
86
  return null;
87
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")
@@ -95,30 +95,30 @@ function dr() {
95
95
  return "Portal";
96
96
  case m:
97
97
  return "Profiler";
98
- case T:
98
+ case x:
99
99
  return "StrictMode";
100
- case b:
100
+ case g:
101
101
  return "Suspense";
102
- case u:
102
+ case l:
103
103
  return "SuspenseList";
104
104
  }
105
105
  if (typeof e == "object")
106
106
  switch (e.$$typeof) {
107
- case p:
107
+ case c:
108
108
  var r = e;
109
109
  return re(r) + ".Consumer";
110
- case s:
110
+ case u:
111
111
  var t = e;
112
112
  return re(t._context) + ".Provider";
113
- case f:
113
+ case d:
114
114
  return We(e, e.render, "ForwardRef");
115
115
  case R:
116
116
  var n = e.displayName || null;
117
- return n !== null ? n : x(e.type) || "Memo";
117
+ return n !== null ? n : T(e.type) || "Memo";
118
118
  case P: {
119
- var i = e, l = i._payload, o = i._init;
119
+ var i = e, s = i._payload, o = i._init;
120
120
  try {
121
- return x(o(l));
121
+ return T(o(s));
122
122
  } catch {
123
123
  return null;
124
124
  }
@@ -126,18 +126,18 @@ function dr() {
126
126
  }
127
127
  return null;
128
128
  }
129
- var C = Object.assign, F = 0, te, ne, ae, oe, ie, ue, se;
130
- function le() {
129
+ var C = Object.assign, F = 0, te, ne, ae, oe, ie, ue, le;
130
+ function se() {
131
131
  }
132
- le.__reactDisabledLog = !0;
132
+ se.__reactDisabledLog = !0;
133
133
  function $e() {
134
134
  {
135
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;
136
+ te = console.log, ne = console.info, ae = console.warn, oe = console.error, ie = console.group, ue = console.groupCollapsed, le = console.groupEnd;
137
137
  var e = {
138
138
  configurable: !0,
139
139
  enumerable: !0,
140
- value: le,
140
+ value: se,
141
141
  writable: !0
142
142
  };
143
143
  Object.defineProperties(console, {
@@ -181,7 +181,7 @@ function dr() {
181
181
  value: ue
182
182
  }),
183
183
  groupEnd: C({}, e, {
184
- value: se
184
+ value: le
185
185
  })
186
186
  });
187
187
  }
@@ -219,8 +219,8 @@ function dr() {
219
219
  K = !0;
220
220
  var i = Error.prepareStackTrace;
221
221
  Error.prepareStackTrace = void 0;
222
- var l;
223
- l = B.current, B.current = null, $e();
222
+ var s;
223
+ s = B.current, B.current = null, $e();
224
224
  try {
225
225
  if (r) {
226
226
  var o = function() {
@@ -233,47 +233,47 @@ function dr() {
233
233
  }), typeof Reflect == "object" && Reflect.construct) {
234
234
  try {
235
235
  Reflect.construct(o, []);
236
- } catch (g) {
237
- n = g;
236
+ } catch (b) {
237
+ n = b;
238
238
  }
239
239
  Reflect.construct(e, [], o);
240
240
  } else {
241
241
  try {
242
242
  o.call();
243
- } catch (g) {
244
- n = g;
243
+ } catch (b) {
244
+ n = b;
245
245
  }
246
246
  e.call(o.prototype);
247
247
  }
248
248
  } else {
249
249
  try {
250
250
  throw Error();
251
- } catch (g) {
252
- n = g;
251
+ } catch (b) {
252
+ n = b;
253
253
  }
254
254
  e();
255
255
  }
256
- } catch (g) {
257
- if (g && n && typeof g.stack == "string") {
258
- for (var a = g.stack.split(`
256
+ } catch (b) {
257
+ if (b && n && typeof b.stack == "string") {
258
+ for (var a = b.stack.split(`
259
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)
260
+ `), v = a.length - 1, p = h.length - 1; v >= 1 && p >= 0 && a[v] !== h[p]; )
261
+ p--;
262
+ for (; v >= 1 && p >= 0; v--, p--)
263
+ if (a[v] !== h[p]) {
264
+ if (v !== 1 || p !== 1)
265
265
  do
266
- if (c--, v--, v < 0 || a[c] !== h[v]) {
266
+ if (v--, p--, p < 0 || a[v] !== h[p]) {
267
267
  var _ = `
268
- ` + a[c].replace(" at new ", " at ");
268
+ ` + a[v].replace(" at new ", " at ");
269
269
  return e.displayName && _.includes("<anonymous>") && (_ = _.replace("<anonymous>", e.displayName)), typeof e == "function" && L.set(e, _), _;
270
270
  }
271
- while (c >= 1 && v >= 0);
271
+ while (v >= 1 && p >= 0);
272
272
  break;
273
273
  }
274
274
  }
275
275
  } finally {
276
- K = !1, B.current = l, Ye(), Error.prepareStackTrace = i;
276
+ K = !1, B.current = s, Ye(), Error.prepareStackTrace = i;
277
277
  }
278
278
  var D = e ? e.displayName || e.name : "", S = D ? M(D) : "";
279
279
  return typeof e == "function" && L.set(e, S), S;
@@ -293,21 +293,21 @@ function dr() {
293
293
  if (typeof e == "string")
294
294
  return M(e);
295
295
  switch (e) {
296
- case b:
296
+ case g:
297
297
  return M("Suspense");
298
- case u:
298
+ case l:
299
299
  return M("SuspenseList");
300
300
  }
301
301
  if (typeof e == "object")
302
302
  switch (e.$$typeof) {
303
- case f:
303
+ case d:
304
304
  return Le(e.render);
305
305
  case R:
306
306
  return V(e.type, r, t);
307
307
  case P: {
308
- var n = e, i = n._payload, l = n._init;
308
+ var n = e, i = n._payload, s = n._init;
309
309
  try {
310
- return V(l(i), r, t);
310
+ return V(s(i), r, t);
311
311
  } catch {
312
312
  }
313
313
  }
@@ -324,9 +324,9 @@ function dr() {
324
324
  }
325
325
  function Ue(e, r, t, n, i) {
326
326
  {
327
- var l = Function.call.bind(A);
327
+ var s = Function.call.bind(A);
328
328
  for (var o in e)
329
- if (l(e, o)) {
329
+ if (s(e, o)) {
330
330
  var a = void 0;
331
331
  try {
332
332
  if (typeof e[o] != "function") {
@@ -334,8 +334,8 @@ function dr() {
334
334
  throw h.name = "Invariant Violation", h;
335
335
  }
336
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;
337
+ } catch (v) {
338
+ a = v;
339
339
  }
340
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
341
  }
@@ -379,7 +379,7 @@ function dr() {
379
379
  }
380
380
  return e.ref !== void 0;
381
381
  }
382
- function ze(e) {
382
+ function Ge(e) {
383
383
  if (A.call(e, "key")) {
384
384
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
385
385
  if (r && r.isReactWarning)
@@ -387,7 +387,7 @@ function dr() {
387
387
  }
388
388
  return e.key !== void 0;
389
389
  }
390
- function Ge(e, r) {
390
+ function ze(e, r) {
391
391
  typeof e.ref == "string" && ye.current;
392
392
  }
393
393
  function Xe(e, r) {
@@ -412,17 +412,17 @@ function dr() {
412
412
  });
413
413
  }
414
414
  }
415
- var Ze = function(e, r, t, n, i, l, o) {
415
+ var Ze = function(e, r, t, n, i, s, o) {
416
416
  var a = {
417
417
  // This tag allows us to uniquely identify this as a React Element
418
- $$typeof: d,
418
+ $$typeof: f,
419
419
  // Built-in properties that belong on the element
420
420
  type: e,
421
421
  key: r,
422
422
  ref: t,
423
423
  props: o,
424
424
  // Record the component responsible for creating this element.
425
- _owner: l
425
+ _owner: s
426
426
  };
427
427
  return a._store = {}, Object.defineProperty(a._store, "validated", {
428
428
  configurable: !1,
@@ -443,23 +443,23 @@ function dr() {
443
443
  };
444
444
  function Qe(e, r, t, n, i) {
445
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]);
446
+ var s, o = {}, a = null, h = null;
447
+ t !== void 0 && (pe(t), a = "" + t), Ge(r) && (pe(r.key), a = "" + r.key), qe(r) && (h = r.ref, ze(r, i));
448
+ for (s in r)
449
+ A.call(r, s) && !Ke.hasOwnProperty(s) && (o[s] = r[s]);
450
450
  if (e && e.defaultProps) {
451
- var c = e.defaultProps;
452
- for (l in c)
453
- o[l] === void 0 && (o[l] = c[l]);
451
+ var v = e.defaultProps;
452
+ for (s in v)
453
+ o[s] === void 0 && (o[s] = v[s]);
454
454
  }
455
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);
456
+ var p = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
457
+ a && Xe(o, p), h && He(o, p);
458
458
  }
459
459
  return Ze(e, a, h, i, n, ye.current, o);
460
460
  }
461
461
  }
462
- var z = j.ReactCurrentOwner, be = j.ReactDebugCurrentFrame;
462
+ var G = j.ReactCurrentOwner, be = j.ReactDebugCurrentFrame;
463
463
  function k(e) {
464
464
  if (e) {
465
465
  var r = e._owner, t = V(e.type, e._source, r ? r.type : null);
@@ -467,15 +467,15 @@ function dr() {
467
467
  } else
468
468
  be.setExtraStackFrame(null);
469
469
  }
470
- var G;
471
- G = !1;
470
+ var z;
471
+ z = !1;
472
472
  function X(e) {
473
- return typeof e == "object" && e !== null && e.$$typeof === d;
473
+ return typeof e == "object" && e !== null && e.$$typeof === f;
474
474
  }
475
475
  function _e() {
476
476
  {
477
- if (z.current) {
478
- var e = x(z.current.type);
477
+ if (G.current) {
478
+ var e = T(G.current.type);
479
479
  if (e)
480
480
  return `
481
481
 
@@ -510,7 +510,7 @@ Check the top-level render call using <` + t + ">.");
510
510
  return;
511
511
  Ee[t] = !0;
512
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);
513
+ e && e._owner && e._owner !== G.current && (n = " It was passed a child from " + T(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
514
  }
515
515
  }
516
516
  function me(e, r) {
@@ -527,7 +527,7 @@ Check the top-level render call using <` + t + ">.");
527
527
  else if (e) {
528
528
  var i = Ce(e);
529
529
  if (typeof i == "function" && i !== e.entries)
530
- for (var l = i.call(e), o; !(o = l.next()).done; )
530
+ for (var s = i.call(e), o; !(o = s.next()).done; )
531
531
  X(o.value) && Re(o.value, r);
532
532
  }
533
533
  }
@@ -540,18 +540,18 @@ Check the top-level render call using <` + t + ">.");
540
540
  var t;
541
541
  if (typeof r == "function")
542
542
  t = r.propTypes;
543
- else if (typeof r == "object" && (r.$$typeof === f || // Note: Memo only checks outer props here.
543
+ else if (typeof r == "object" && (r.$$typeof === d || // Note: Memo only checks outer props here.
544
544
  // Inner props are checked in the reconciler.
545
545
  r.$$typeof === R))
546
546
  t = r.propTypes;
547
547
  else
548
548
  return;
549
549
  if (t) {
550
- var n = x(r);
550
+ var n = T(r);
551
551
  Ue(t, e.props, "prop", n, e);
552
- } else if (r.PropTypes !== void 0 && !G) {
553
- G = !0;
554
- var i = x(r);
552
+ } else if (r.PropTypes !== void 0 && !z) {
553
+ z = !0;
554
+ var i = T(r);
555
555
  y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
556
556
  }
557
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.");
@@ -570,7 +570,7 @@ Check the top-level render call using <` + t + ">.");
570
570
  }
571
571
  }
572
572
  var we = {};
573
- function Te(e, r, t, n, i, l) {
573
+ function xe(e, r, t, n, i, s) {
574
574
  {
575
575
  var o = Ie(e);
576
576
  if (!o) {
@@ -578,12 +578,12 @@ Check the top-level render call using <` + t + ">.");
578
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
579
  var h = er();
580
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);
581
+ var v;
582
+ e === null ? v = "null" : q(e) ? v = "array" : e !== void 0 && e.$$typeof === f ? (v = "<" + (T(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : v = 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", v, a);
583
583
  }
584
- var v = Qe(e, r, t, i, l);
585
- if (v == null)
586
- return v;
584
+ var p = Qe(e, r, t, i, s);
585
+ if (p == null)
586
+ return p;
587
587
  if (o) {
588
588
  var _ = r.children;
589
589
  if (_ !== void 0)
@@ -598,27 +598,27 @@ Check the top-level render call using <` + t + ">.");
598
598
  me(_, e);
599
599
  }
600
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}";
601
+ var S = T(e), b = Object.keys(r).filter(function(sr) {
602
+ return sr !== "key";
603
+ }), H = b.length > 0 ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}";
604
604
  if (!we[S + H]) {
605
- var sr = g.length > 0 ? "{" + g.join(": ..., ") + ": ...}" : "{}";
605
+ var lr = b.length > 0 ? "{" + b.join(": ..., ") + ": ...}" : "{}";
606
606
  y(`A props object containing a "key" prop is being spread into JSX:
607
607
  let props = %s;
608
608
  <%s {...props} />
609
609
  React keys must be passed directly to JSX without using spread:
610
610
  let props = %s;
611
- <%s key={someKey} {...props} />`, H, S, sr, S), we[S + H] = !0;
611
+ <%s key={someKey} {...props} />`, H, S, lr, S), we[S + H] = !0;
612
612
  }
613
613
  }
614
- return e === E ? nr(v) : tr(v), v;
614
+ return e === E ? nr(p) : tr(p), p;
615
615
  }
616
616
  }
617
617
  function ar(e, r, t) {
618
- return Te(e, r, t, !0);
618
+ return xe(e, r, t, !0);
619
619
  }
620
620
  function or(e, r, t) {
621
- return Te(e, r, t, !1);
621
+ return xe(e, r, t, !1);
622
622
  }
623
623
  var ir = or, ur = ar;
624
624
  W.Fragment = E, W.jsx = ir, W.jsxs = ur;
@@ -626,71 +626,72 @@ React keys must be passed directly to JSX without using spread:
626
626
  }
627
627
  process.env.NODE_ENV === "production" ? Z.exports = cr() : Z.exports = dr();
628
628
  var N = Z.exports;
629
- const vr = "_t_15niz_7", pr = {
629
+ const vr = "_t_bkucs_7", pr = {
630
630
  t: vr
631
631
  }, yr = ({
632
632
  content: w,
633
- position: d,
633
+ position: f,
634
634
  orientation: O = "up",
635
635
  update: E,
636
- textAlign: T
636
+ textAlign: x
637
637
  }) => {
638
638
  const m = $.useRef(null);
639
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 = {
640
+ const u = m.current;
641
+ u.style.opacity = "0", u.style.width = "auto", u.style.left = "0px", u.style.top = "0px";
642
+ let c = {
643
643
  x: 0,
644
- y: 0
644
+ y: 0,
645
+ r: ""
645
646
  };
646
- const f = s.getBoundingClientRect();
647
- let b = d.width / 2;
648
- s.style.width = f.width + "px";
649
- let u = 0;
647
+ const d = u.getBoundingClientRect();
648
+ let g = f.width / 2;
649
+ u.style.width = d.width + "px";
650
+ let l = 0;
650
651
  switch (O) {
651
652
  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
+ l = f.left + g - d.width / 2 - 10, l = window.innerWidth < l + d.width ? window.innerWidth - d.width - 20 : l, l = l < 0 ? 0 : l, u.style.left = l + "px", u.style.top = f.top - d.height - 10 + "px", c.x = f.left + g, c.y = f.top - 10;
653
654
  break;
654
655
  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
+ l = f.left + g - d.width / 2 - 10, l = l < 0 ? 0 : l, u.style.left = l + "px", u.style.top = f.bottom + 10 + "px", c.x = f.left + g, c.y = f.bottom - 5, c.r = "rotate(180deg)";
656
657
  break;
657
658
  case "left":
658
- s.style.top = d.top + "px", s.style.left = d.left - f.width - d.width + "px";
659
+ u.style.top = f.top - 10 + "px", u.style.left = f.left - d.width - f.width + "px", c.x = f.left - g + 5, c.y = f.top + 5, c.r = "rotate(270deg)";
659
660
  break;
660
661
  case "right":
661
- s.style.top = d.top + "px", s.style.left = d.right + "px";
662
+ u.style.top = f.top - 10 + "px", u.style.left = f.right + "px", c.x = f.right + 5, c.y = f.top + 5, c.r = "rotate(90deg)";
662
663
  break;
663
664
  }
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
+ u.style.setProperty("--tooltip-arrow-x", c.x + "px"), u.style.setProperty("--tooltip-arrow-y", c.y + "px"), u.style.setProperty("--tooltip-arrow-r", c.r), u.style.transition = "opacity 0.3s", u.style.textAlign = x, u.style.opacity = "1";
665
666
  }, [E]), /* @__PURE__ */ N.jsx("div", { ref: m, className: pr.t, children: w });
666
667
  }, br = ({
667
668
  content: w,
668
- children: d,
669
+ children: f,
669
670
  className: O,
670
671
  textAlign: E = "center",
671
- orientation: T = "down",
672
+ orientation: x = "down",
672
673
  dev: m,
673
- ...s
674
+ ...u
674
675
  }) => {
675
- const [p, f] = $.useState(null), b = (R) => {
676
- f(p.currentTarget);
677
- }, u = () => {
678
- m || f(null);
676
+ const [c, d] = $.useState(null), g = (R) => {
677
+ d(R.currentTarget);
678
+ }, l = () => {
679
+ m || d(null);
679
680
  };
680
681
  return /* @__PURE__ */ N.jsxs(
681
682
  "span",
682
683
  {
683
684
  className: O,
684
- onMouseOver: b,
685
- onMouseOut: u,
685
+ onMouseOver: g,
686
+ onMouseOut: l,
686
687
  children: [
687
- d,
688
- p !== null && fr(
689
- s.element ? /* @__PURE__ */ N.jsx(
690
- s.element,
688
+ f,
689
+ c !== null && fr(
690
+ u.element ? /* @__PURE__ */ N.jsx(
691
+ u.element,
691
692
  {
692
693
  content: w,
693
- position: p.getBoundingClientRect(),
694
+ position: c.getBoundingClientRect(),
694
695
  textAlign: E,
695
696
  update: Date.now()
696
697
  }
@@ -698,10 +699,10 @@ const vr = "_t_15niz_7", pr = {
698
699
  yr,
699
700
  {
700
701
  update: Date.now(),
701
- orientation: T,
702
+ orientation: x,
702
703
  content: w,
703
704
  textAlign: E,
704
- position: p.getBoundingClientRect()
705
+ position: c.getBoundingClientRect()
705
706
  }
706
707
  ),
707
708
  document.body
package/dist/index.umd.js CHANGED
@@ -1,5 +1,5 @@
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={};/**
1
+ (function(_,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],x):(_=typeof globalThis<"u"?globalThis:_||self,x((_.elCRM=_.elCRM||{},_.elCRM.components={}),_.React,_.ReactDOM))})(this,function(_,x,je){"use strict";var ee=document.createElement("style");ee.textContent=`:root{--tooltip-background: #28292d;--tooltip-color: #ffffff94;--tooltip-radius: 15px}._t_bkucs_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_bkucs_7:before{content:"";position:fixed;pointer-events:none;top:var(--tooltip-arrow-y);left:var(--tooltip-arrow-x);transform:var(--tooltip-arrow-r);margin-left:-8px;border-width:8px;border-style:solid;border-color:var(--tooltip-background) transparent transparent transparent}
2
+ /*$vite$:1*/`,document.head.appendChild(ee);var q={exports:{}},I={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.min.js
5
5
  *
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * This source code is licensed under the MIT license found in the
9
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 $={};/**
10
+ */var re;function ke(){if(re)return I;re=1;var T=x,f=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,w={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,g){var l,R={},S=null,L=null;g!==void 0&&(S=""+g),d.key!==void 0&&(S=""+d.key),d.ref!==void 0&&(L=d.ref);for(l in d)E.call(d,l)&&!w.hasOwnProperty(l)&&(R[l]=d[l]);if(c&&c.defaultProps)for(l in d=c.defaultProps,d)R[l]===void 0&&(R[l]=d[l]);return{$$typeof:f,type:c,key:S,ref:L,props:R,_owner:O.current}}return I.Fragment=P,I.jsx=u,I.jsxs=u,I}var $={};/**
11
11
  * @license React
12
12
  * react-jsx-runtime.development.js
13
13
  *
@@ -15,17 +15,17 @@
15
15
  *
16
16
  * This source code is licensed under the MIT license found in the
17
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(`
18
+ */var te;function De(){return te||(te=1,process.env.NODE_ENV!=="production"&&function(){var T=x,f=Symbol.for("react.element"),P=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),l=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===w||Ue||e===O||e===g||e===l||Ve||e===L||Me||Ye||Le||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===R||e.$$typeof===u||e.$$typeof===c||e.$$typeof===d||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 w:return"Profiler";case O:return"StrictMode";case g:return"Suspense";case l:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case c:var r=e;return ie(r)+".Consumer";case u:var t=e;return ie(t._context)+".Provider";case d: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 qe(){{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 Je(){{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 J=D.ReactCurrentDispatcher,K;function V(e,r,t){{if(K===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);K=n&&n[1]||""}return`
19
+ `+K+e}}var z=!1,U;{var Ke=typeof WeakMap=="function"?WeakMap:Map;U=new Ke}function ye(e,r){if(!e||z)return"";{var t=U.get(e);if(t!==void 0)return t}var n;z=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var s;s=J.current,J.current=null,qe();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(b){n=b}Reflect.construct(e,[],o)}else{try{o.call()}catch(b){n=b}e.call(o.prototype)}}else{try{throw Error()}catch(b){n=b}e()}}catch(b){if(b&&n&&typeof b.stack=="string"){for(var a=b.stack.split(`
20
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`
21
+ `),v=a.length-1,p=h.length-1;v>=1&&p>=0&&a[v]!==h[p];)p--;for(;v>=1&&p>=0;v--,p--)if(a[v]!==h[p]){if(v!==1||p!==1)do if(v--,p--,p<0||a[v]!==h[p]){var m=`
22
+ `+a[v].replace(" at new "," at ");return e.displayName&&m.includes("<anonymous>")&&(m=m.replace("<anonymous>",e.displayName)),typeof e=="function"&&U.set(e,m),m}while(v>=1&&p>=0);break}}}finally{z=!1,J.current=s,Je(),Error.prepareStackTrace=i}var A=e?e.displayName||e.name:"",k=A?V(A):"";return typeof e=="function"&&U.set(e,k),k}function ze(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 g:return V("Suspense");case l:return V("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case d:return ze(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(v){a=v}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 be(e),!1}catch{return!0}}function be(e){return""+e}function me(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)),be(e)}var _e=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"&&_e.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:f,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&&(me(t),a=""+t),tr(r)&&(me(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 v=e.defaultProps;for(s in v)o[s]===void 0&&(o[s]=v[s])}if(a||h){var p=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&ar(o,p),h&&or(o,p)}return ir(e,a,h,i,n,_e.current,o)}}var X=D.ReactCurrentOwner,xe=D.ReactDebugCurrentFrame;function F(e){if(e){var r=e._owner,t=N(e.type,e._source,r?r.type:null);xe.setExtraStackFrame(t)}else xe.setExtraStackFrame(null)}var H;H=!1;function Z(e){return typeof e=="object"&&e!==null&&e.$$typeof===f}function we(){{if(X.current){var e=C(X.current.type);if(e)return`
23
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=`
24
+ Check the render method of \``+e+"`."}return""}}function lr(e){return""}var Te={};function sr(e){{var r=we();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
25
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:
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===d||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+=we();var v;e===null?v="null":G(e)?v="array":e!==void 0&&e.$$typeof===f?(v="<"+(C(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):v=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",v,a)}var p=ur(e,r,t,i,s);if(p==null)return p;if(o){var m=r.children;if(m!==void 0)if(n)if(G(m)){for(var A=0;A<m.length;A++)Ce(m[A],e);Object.freeze&&Object.freeze(m)}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(m,e)}if(M.call(r,"key")){var k=C(e),b=Object.keys(r).filter(function(gr){return gr!=="key"}),Q=b.length>0?"{key: someKey, "+b.join(": ..., ")+": ...}":"{key: someKey}";if(!Pe[k+Q]){var hr=b.length>0?"{"+b.join(": ..., ")+": ...}":"{}";y(`A props object containing a "key" prop is being spread into JSX:
27
27
  let props = %s;
28
28
  <%s {...props} />
29
29
  React keys must be passed directly to JSX without using spread:
30
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"})});
31
+ <%s key={someKey} {...props} />`,Q,k,hr,k),Pe[k+Q]=!0}}return e===E?cr(p):fr(p),p}}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"?q.exports=ke():q.exports=De();var Y=q.exports;const Fe={t:"_t_bkucs_7"},ne=({content:T,position:f,orientation:P="up",update:E,textAlign:O})=>{const w=x.useRef(null);return x.useEffect(()=>{const u=w.current;u.style.opacity="0",u.style.width="auto",u.style.left="0px",u.style.top="0px";let c={x:0,y:0,r:""};const d=u.getBoundingClientRect();let g=f.width/2;u.style.width=d.width+"px";let l=0;switch(P){case"up":l=f.left+g-d.width/2-10,l=window.innerWidth<l+d.width?window.innerWidth-d.width-20:l,l=l<0?0:l,u.style.left=l+"px",u.style.top=f.top-d.height-10+"px",c.x=f.left+g,c.y=f.top-10;break;case"down":l=f.left+g-d.width/2-10,l=l<0?0:l,u.style.left=l+"px",u.style.top=f.bottom+10+"px",c.x=f.left+g,c.y=f.bottom-5,c.r="rotate(180deg)";break;case"left":u.style.top=f.top-10+"px",u.style.left=f.left-d.width-f.width+"px",c.x=f.left-g+5,c.y=f.top+5,c.r="rotate(270deg)";break;case"right":u.style.top=f.top-10+"px",u.style.left=f.right+"px",c.x=f.right+5,c.y=f.top+5,c.r="rotate(90deg)";break}u.style.setProperty("--tooltip-arrow-x",c.x+"px"),u.style.setProperty("--tooltip-arrow-y",c.y+"px"),u.style.setProperty("--tooltip-arrow-r",c.r),u.style.transition="opacity 0.3s",u.style.textAlign=O,u.style.opacity="1"},[E]),Y.jsx("div",{ref:w,className:Fe.t,children:T})},Ae=({content:T,children:f,className:P,textAlign:E="center",orientation:O="down",dev:w,...u})=>{const[c,d]=x.useState(null),g=R=>{d(R.currentTarget)},l=()=>{w||d(null)};return Y.jsxs("span",{className:P,onMouseOver:g,onMouseOut:l,children:[f,c!==null&&je.createPortal(u.element?Y.jsx(u.element,{content:T,position:c.getBoundingClientRect(),textAlign:E,update:Date.now()}):Y.jsx(ne,{update:Date.now(),orientation:O,content:T,textAlign:E,position:c.getBoundingClientRect()}),document.body)]})};_.Item=ne,_.Tooltip=Ae,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elcrm/tooltip",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "plugin for elCRM",
5
5
  "type": "module",
6
6
  "author": "MaSkal <dev@elcrm.online>",