prometeo-design-system 6.5.2 → 6.5.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.
@@ -1,22 +1,22 @@
1
- import { j as m } from "./jsx-runtime-GkKLlHH4.js";
2
- import { useRef as S, useState as y, useLayoutEffect as U, useCallback as I, useEffect as h, useMemo as de } from "react";
3
- import { createPortal as ze } from "react-dom";
4
- import { c as Be } from "./cn-B6yFEsav.js";
5
- const Y = 300, H = 24, Z = 12, E = 24, j = 24, De = {
1
+ import { j as a } from "./jsx-runtime-GkKLlHH4.js";
2
+ import { useRef as O, useState as x, useLayoutEffect as Q, useCallback as I, useEffect as b, useMemo as be } from "react";
3
+ import { createPortal as Ge } from "react-dom";
4
+ import { c as Me } from "./cn-B6yFEsav.js";
5
+ const ee = 300, Ve = 24, ge = 8, te = 12, E = 24, N = 24, qe = {
6
6
  backgroundColor: "var(--neutral-800)",
7
7
  border: "1px solid var(--neutral-600)",
8
8
  transition: "all 0.3s ease-in-out"
9
- }, O = (t, n, r) => Math.min(Math.max(t, n), r), Me = (t) => {
9
+ }, R = (t, n, r) => Math.min(Math.max(t, n), r), Xe = (t) => {
10
10
  if (!t.endsWith("%"))
11
11
  return null;
12
12
  const n = Number(t.replace("%", ""));
13
- return Number.isNaN(n) ? null : O(n, 0, 100);
14
- }, _e = (t) => {
13
+ return Number.isNaN(n) ? null : R(n, 0, 100);
14
+ }, Ue = (t) => {
15
15
  if (!t.endsWith("px"))
16
16
  return null;
17
17
  const n = Number(t.replace("px", ""));
18
18
  return Number.isNaN(n) ? null : n;
19
- }, fe = (t, n) => {
19
+ }, we = (t, n) => {
20
20
  if (n <= 0 || t === "left")
21
21
  return 0;
22
22
  if (t === "center")
@@ -24,50 +24,51 @@ const Y = 300, H = 24, Z = 12, E = 24, j = 24, De = {
24
24
  if (t === "right")
25
25
  return n;
26
26
  if (typeof t == "number")
27
- return O(t, 0, 100) / 100 * n;
28
- const r = Me(t);
27
+ return R(t, 0, 100) / 100 * n;
28
+ const r = Xe(t);
29
29
  if (r !== null)
30
30
  return r / 100 * n;
31
- const u = _e(t);
32
- return u !== null ? O(u, 0, n) : n / 2;
33
- }, Ge = (t, n) => {
34
- const r = fe(n, t.width);
31
+ const l = Ue(t);
32
+ return l !== null ? R(l, 0, n) : n / 2;
33
+ }, Ye = (t, n) => {
34
+ const r = we(n, t.width);
35
35
  return t.left + r;
36
- }, Ve = (t) => t === "left" || t === "right", Xe = (t, n, r, u) => {
37
- const x = t - n, v = u / 2;
38
- return O(x, v, Math.max(r - v, 0));
39
- }, ge = (t) => typeof t == "function", qe = (t, n) => n === "left" ? t === "below" ? "0,24 24,24 0,0" : "0,0 24,0 0,24" : n === "right" ? t === "below" ? "24,24 0,24 24,0" : "24,0 0,0 24,24" : t === "below" ? "12,0 0,24 24,24" : "0,0 24,0 12,24", Ue = (t) => t.startsWith("--") ? t : t.replace(/[A-Z]/g, (n) => `-${n.toLowerCase()}`), et = ({
36
+ }, Ze = (t) => t === "left" || t === "right", Je = (t, n, r, l) => {
37
+ const C = t - n, h = l / 2;
38
+ return R(C, h, Math.max(r - h, 0));
39
+ }, Ke = (t) => typeof t == "function", Qe = (t, n) => n === "left" ? t === "below" ? "0,24 24,24 0,0" : "0,0 24,0 0,24" : n === "right" ? t === "below" ? "24,24 0,24 24,0" : "24,0 0,0 24,24" : t === "below" ? "12,0 0,24 24,24" : "0,0 24,0 12,24", et = (t) => t.startsWith("--") ? t : t.replace(/[A-Z]/g, (n) => `-${n.toLowerCase()}`), st = ({
40
40
  triggerRef: t,
41
41
  children: n,
42
42
  trigger: r = "click",
43
- xPosition: u = "center",
44
- hoverDelay: x = 200,
45
- attachToParent: v = !1,
46
- debugMode: a = !1,
47
- highLightTrigger: A = !1,
48
- highLightStyles: J = De,
49
- highLightClassName: R,
50
- className: K,
51
- context: pe
43
+ xPosition: l = "center",
44
+ hoverDelay: C = 200,
45
+ attachToParent: h = !1,
46
+ debugMode: f = !1,
47
+ highLightTrigger: F = !1,
48
+ highLightStyles: ne = qe,
49
+ highLightClassName: T,
50
+ className: re,
51
+ hideIndicator: $ = !1,
52
+ context: he
52
53
  }) => {
53
- const C = S(null), T = S(null), w = S(null), W = S(null), Q = S(""), N = S({}), [d, $] = y(!1), [f, ee] = y(!1), [me, z] = y(!1), [te, B] = y(!1), [c, be] = y({
54
+ const L = O(null), G = O(null), W = O(null), v = O(null), A = O(null), oe = O(""), H = O({}), [p, z] = x(!1), [u, se] = x(!1), [ve, M] = x(!1), [ie, V] = x(!1), [d, ye] = x({
54
55
  left: 0,
55
56
  top: 0,
56
57
  placement: "below",
57
58
  panelWidth: 0,
58
59
  indicatorOffset: 0
59
- }), [D, ne] = y(null), [o, he] = y(t.current), P = d || a, [L, re] = y({
60
+ }), [g, ce] = x(null), [s, xe] = x(t.current), P = p || f, [k, le] = x({
60
61
  borderColor: "",
61
62
  borderStyle: "",
62
63
  borderWidth: "",
63
64
  backgroundColor: ""
64
65
  });
65
- U(() => {
66
+ Q(() => {
66
67
  const e = t.current;
67
- o !== e && he(e);
68
- }, [o, t]), U(() => {
69
- if (!f || !C.current) {
70
- re({
68
+ s !== e && xe(e);
69
+ }, [s, t]), Q(() => {
70
+ if (!u || !L.current) {
71
+ le({
71
72
  borderColor: "",
72
73
  borderStyle: "",
73
74
  borderWidth: "",
@@ -75,153 +76,162 @@ const Y = 300, H = 24, Z = 12, E = 24, j = 24, De = {
75
76
  });
76
77
  return;
77
78
  }
78
- const e = getComputedStyle(C.current);
79
- re({
79
+ const e = getComputedStyle(L.current);
80
+ le({
80
81
  borderColor: e.borderColor,
81
82
  borderStyle: e.borderStyle,
82
83
  borderWidth: e.borderWidth,
83
84
  backgroundColor: e.backgroundColor
84
85
  });
85
- }, [f, K, a]);
86
- const M = () => {
87
- T.current && clearTimeout(T.current), w.current && clearTimeout(w.current);
88
- }, F = I(() => {
89
- M(), $(!0);
90
- }, []), oe = I(() => {
91
- M(), $(!1);
92
- }, []), _ = I(() => {
93
- T.current && clearTimeout(T.current), T.current = setTimeout(() => {
94
- $(!0);
95
- }, x);
96
- }, [x]), G = I(() => {
97
- w.current && clearTimeout(w.current), w.current = setTimeout(() => {
98
- $(!1);
99
- }, x);
100
- }, [x]), V = I(() => {
101
- w.current && (clearTimeout(w.current), w.current = null);
102
- }, []), k = I(() => {
86
+ }, [u, re, f]);
87
+ const q = () => {
88
+ W.current && clearTimeout(W.current), v.current && clearTimeout(v.current);
89
+ }, D = I(() => {
90
+ q(), z(!0);
91
+ }, []), ue = I(() => {
92
+ q(), z(!1);
93
+ }, []), X = I(() => {
94
+ W.current && clearTimeout(W.current), W.current = setTimeout(() => {
95
+ z(!0);
96
+ }, C);
97
+ }, [C]), U = I(() => {
98
+ v.current && clearTimeout(v.current), v.current = setTimeout(() => {
99
+ z(!1);
100
+ }, C);
101
+ }, [C]), Y = I(() => {
102
+ v.current && (clearTimeout(v.current), v.current = null);
103
+ }, []), y = I(() => {
103
104
  if (typeof window > "u")
104
105
  return;
105
- const e = t.current, i = C.current;
106
+ const e = t.current, i = L.current;
106
107
  if (!e || !i)
107
108
  return;
108
- const l = e.getBoundingClientRect(), s = i.getBoundingClientRect(), p = Ge(l, u), b = fe(u, s.width), X = p - b, Ae = window.innerWidth, Ne = Math.max(Z, Ae - s.width - Z), g = O(X, Z, Ne), $e = l.top, Fe = window.innerHeight - l.bottom;
109
- let le = "below", q = l.bottom + H;
110
- Fe < s.height + H && $e >= s.height + H && (le = "above", q = l.top - s.height - H);
111
- let ue = g;
112
- if (v) {
113
- const ae = (e.offsetParent ?? document.body).getBoundingClientRect();
114
- ue = g - ae.left, q -= ae.top;
109
+ const c = e.getBoundingClientRect(), o = i.getBoundingClientRect(), m = Ye(c, l), w = we(l, o.width), Z = m - w, ze = window.innerWidth, De = Math.max(te, ze - o.width - te), J = R(Z, te, De), Be = c.top, _e = window.innerHeight - c.bottom, B = $ ? ge : Ve;
110
+ let K = "below", j = c.bottom + B;
111
+ _e < o.height + B && Be >= o.height + B && (K = "above", j = c.top - o.height - B);
112
+ let _ = J;
113
+ if (h) {
114
+ const me = (e.offsetParent ?? document.body).getBoundingClientRect();
115
+ _ = J - me.left, j -= me.top;
115
116
  }
116
- const He = Ve(u) ? 0 : Xe(p, g, s.width, E);
117
- be({
118
- left: ue,
119
- top: q,
120
- placement: le,
121
- panelWidth: s.width,
122
- indicatorOffset: He
117
+ const pe = Ze(l) ? 0 : Je(m, J, o.width, E);
118
+ G.current && (G.current.style.transform = `translate3d(${_}px, ${j}px, 0)`), ye((S) => S.left === _ && S.top === j && S.placement === K && S.panelWidth === o.width && S.indicatorOffset === pe ? S : {
119
+ left: _,
120
+ top: j,
121
+ placement: K,
122
+ panelWidth: o.width,
123
+ indicatorOffset: pe
123
124
  });
124
- }, [v, u, t]);
125
- U(() => {
126
- f && k();
127
- }, [f, k]), h(() => {
128
- if (!f || typeof window > "u")
125
+ }, [h, l, t, $]);
126
+ Q(() => {
127
+ u && y();
128
+ }, [u, y]), b(() => {
129
+ if (!u || typeof window > "u")
129
130
  return;
130
131
  const e = () => {
131
- k();
132
+ y();
132
133
  };
133
134
  return window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
134
135
  window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
135
136
  };
136
- }, [f, k]), h(() => {
137
- if (!f || !C.current || typeof ResizeObserver > "u")
137
+ }, [u, y]), b(() => {
138
+ if (!u || typeof window > "u")
139
+ return;
140
+ let e = window.requestAnimationFrame(function i() {
141
+ y(), e = window.requestAnimationFrame(i);
142
+ });
143
+ return () => {
144
+ window.cancelAnimationFrame(e);
145
+ };
146
+ }, [u, y]), b(() => {
147
+ if (!u || !L.current || typeof ResizeObserver > "u")
138
148
  return;
139
149
  const e = new ResizeObserver(() => {
140
- k();
150
+ y();
141
151
  });
142
- return e.observe(C.current), () => e.disconnect();
143
- }, [f, k]), h(() => {
152
+ return e.observe(L.current), () => e.disconnect();
153
+ }, [u, y]), b(() => {
144
154
  if (P) {
145
- ee(!0), z(!1);
155
+ se(!0), M(!1);
146
156
  return;
147
157
  }
148
- if (f)
149
- return z(!0), W.current = setTimeout(() => {
150
- z(!1), ee(!1);
151
- }, Y), () => {
152
- W.current && clearTimeout(W.current);
158
+ if (u)
159
+ return M(!0), A.current = setTimeout(() => {
160
+ M(!1), se(!1);
161
+ }, ee), () => {
162
+ A.current && clearTimeout(A.current);
153
163
  };
154
- }, [P, f]), h(() => {
155
- if (!f || !P) {
156
- B(!1);
164
+ }, [P, u]), b(() => {
165
+ if (!u || !P) {
166
+ V(!1);
157
167
  return;
158
168
  }
159
- B(!1);
169
+ V(!1);
160
170
  const e = requestAnimationFrame(() => {
161
171
  requestAnimationFrame(() => {
162
- B(!0);
172
+ V(!0);
163
173
  });
164
174
  });
165
175
  return () => cancelAnimationFrame(e);
166
- }, [f, P]), h(() => () => {
167
- M(), W.current && clearTimeout(W.current);
168
- }, []), h(() => {
169
- if (!(!o || !a))
170
- return Q.current = o.style.outline ?? "", o.style.outline = "2px dashed var(--error-500)", () => {
171
- o.style.outline = Q.current;
176
+ }, [u, P]), b(() => () => {
177
+ q(), A.current && clearTimeout(A.current);
178
+ }, []), b(() => {
179
+ if (!(!s || !f))
180
+ return oe.current = s.style.outline ?? "", s.style.outline = "2px dashed var(--error-500)", () => {
181
+ s.style.outline = oe.current;
172
182
  };
173
- }, [a, o]), h(() => {
174
- const e = o;
183
+ }, [f, s]), b(() => {
184
+ const e = s;
175
185
  if (!e)
176
186
  return;
177
- const i = Object.entries(J).filter(
178
- ([, s]) => s != null
187
+ const i = Object.entries(ne).filter(
188
+ ([, o]) => o != null
179
189
  );
180
- if (!A || !d || i.length === 0) {
181
- const s = N.current;
182
- Object.entries(s).forEach(([p, b]) => {
183
- if (b) {
184
- e.style.setProperty(p, b);
190
+ if (!F || !p || i.length === 0) {
191
+ const o = H.current;
192
+ Object.entries(o).forEach(([m, w]) => {
193
+ if (w) {
194
+ e.style.setProperty(m, w);
185
195
  return;
186
196
  }
187
- e.style.removeProperty(p);
188
- }), N.current = {};
197
+ e.style.removeProperty(m);
198
+ }), H.current = {};
189
199
  return;
190
200
  }
191
- const l = {};
192
- return i.forEach(([s, p]) => {
193
- const b = Ue(s);
194
- l[b] = e.style.getPropertyValue(b), e.style.setProperty(b, String(p));
195
- }), N.current = l, () => {
196
- Object.entries(l).forEach(([s, p]) => {
197
- if (p) {
198
- e.style.setProperty(s, p);
201
+ const c = {};
202
+ return i.forEach(([o, m]) => {
203
+ const w = et(o);
204
+ c[w] = e.style.getPropertyValue(w), e.style.setProperty(w, String(m));
205
+ }), H.current = c, () => {
206
+ Object.entries(c).forEach(([o, m]) => {
207
+ if (m) {
208
+ e.style.setProperty(o, m);
199
209
  return;
200
210
  }
201
- e.style.removeProperty(s);
202
- }), N.current = {};
211
+ e.style.removeProperty(o);
212
+ }), H.current = {};
203
213
  };
204
- }, [J, A, d, o]), h(() => {
205
- const e = o;
206
- if (!e || !R)
214
+ }, [ne, F, p, s]), b(() => {
215
+ const e = s;
216
+ if (!e || !T)
207
217
  return;
208
- if (!(A && d)) {
209
- e.classList.remove(R);
218
+ if (!(F && p)) {
219
+ e.classList.remove(T);
210
220
  return;
211
221
  }
212
- return e.classList.add(R), () => {
213
- e.classList.remove(R);
222
+ return e.classList.add(T), () => {
223
+ e.classList.remove(T);
214
224
  };
215
- }, [R, A, d, o]), h(() => {
216
- if (!a) {
217
- ne(null);
225
+ }, [T, F, p, s]), b(() => {
226
+ if (!f) {
227
+ ce(null);
218
228
  return;
219
229
  }
220
230
  const e = () => {
221
- if (!o)
231
+ if (!s)
222
232
  return;
223
- const i = o.getBoundingClientRect();
224
- ne({
233
+ const i = s.getBoundingClientRect();
234
+ ce({
225
235
  top: i.top,
226
236
  left: i.right + 8,
227
237
  bottom: i.bottom
@@ -231,146 +241,157 @@ const Y = 300, H = 24, Z = 12, E = 24, j = 24, De = {
231
241
  return window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
232
242
  window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
233
243
  };
234
- }, [a, o]), h(() => {
235
- const e = o;
244
+ }, [f, s]), b(() => {
245
+ const e = s;
236
246
  if (!e)
237
247
  return;
238
248
  const i = () => {
239
- r === "hover" && (V(), _());
240
- }, l = () => {
241
- r === "hover" && G();
242
- }, s = () => {
243
- r === "click" && F();
244
- }, p = () => {
245
- r === "doubleClick" && F();
246
- }, b = (X) => {
247
- r === "contextMenu" && (X.preventDefault(), F());
249
+ r === "hover" && (Y(), X());
250
+ }, c = () => {
251
+ r === "hover" && U();
252
+ }, o = () => {
253
+ r === "click" && D();
254
+ }, m = () => {
255
+ r === "doubleClick" && D();
256
+ }, w = (Z) => {
257
+ r === "contextMenu" && (Z.preventDefault(), D());
248
258
  };
249
- return r === "hover" && (e.addEventListener("mouseenter", i), e.addEventListener("mouseleave", l)), r === "click" && e.addEventListener("click", s), r === "doubleClick" && e.addEventListener("dblclick", p), r === "contextMenu" && e.addEventListener("contextmenu", b), () => {
250
- r === "hover" && (e.removeEventListener("mouseenter", i), e.removeEventListener("mouseleave", l)), r === "click" && e.removeEventListener("click", s), r === "doubleClick" && e.removeEventListener("dblclick", p), r === "contextMenu" && e.removeEventListener("contextmenu", b);
259
+ return r === "hover" && (e.addEventListener("mouseenter", i), e.addEventListener("mouseleave", c)), r === "click" && e.addEventListener("click", o), r === "doubleClick" && e.addEventListener("dblclick", m), r === "contextMenu" && e.addEventListener("contextmenu", w), () => {
260
+ r === "hover" && (e.removeEventListener("mouseenter", i), e.removeEventListener("mouseleave", c)), r === "click" && e.removeEventListener("click", o), r === "doubleClick" && e.removeEventListener("dblclick", m), r === "contextMenu" && e.removeEventListener("contextmenu", w);
251
261
  };
252
- }, [r, o, V, _, G, F]), h(() => {
253
- if (r === "hover" || !d || typeof window > "u")
262
+ }, [r, s, Y, X, U, D]), b(() => {
263
+ if (r === "hover" || !p || typeof window > "u")
254
264
  return;
255
265
  const e = (i) => {
256
- const l = i.target;
257
- l && (C.current?.contains(l) || o?.contains(l) || oe());
266
+ const c = i.target;
267
+ c && (L.current?.contains(c) || s?.contains(c) || ue());
258
268
  };
259
269
  return window.addEventListener("mousedown", e, !0), window.addEventListener("touchstart", e, !0), () => {
260
270
  window.removeEventListener("mousedown", e, !0), window.removeEventListener("touchstart", e, !0);
261
271
  };
262
- }, [r, o, oe, d]);
263
- const ve = () => {
264
- r === "hover" && (V(), _());
265
- }, we = () => {
266
- r === "hover" && G();
267
- }, se = de(() => {
268
- if (u === "left")
272
+ }, [r, s, ue, p]);
273
+ const Ee = () => {
274
+ r === "hover" && (Y(), X());
275
+ }, Ce = () => {
276
+ r === "hover" && U();
277
+ }, ae = be(() => {
278
+ if (l === "left")
269
279
  return -1;
270
- if (u === "right")
271
- return Math.max(c.panelWidth - E - 1, 0);
272
- const e = c.indicatorOffset - E / 2, i = Math.max(c.panelWidth - E, 0);
273
- return O(e, 0, i);
274
- }, [c.indicatorOffset, c.panelWidth, u]), ie = de(() => typeof document > "u" ? null : v ? o?.offsetParent ?? document.body : document.body, [v, o]);
275
- if (!ie || !f)
280
+ if (l === "right")
281
+ return Math.max(d.panelWidth - E - 1, 0);
282
+ const e = d.indicatorOffset - E / 2, i = Math.max(d.panelWidth - E, 0);
283
+ return R(e, 0, i);
284
+ }, [d.indicatorOffset, d.panelWidth, l]), de = be(() => typeof document > "u" ? null : h ? s?.offsetParent ?? document.body : document.body, [h, s]);
285
+ if (!de || !u)
276
286
  return null;
277
- const ye = a && !d ? 0.35 : !d && !a || d && !te ? 0 : 1, Ee = a && !d || d && te && !me ? "0" : c.placement === "below" ? "-6px" : "6px", xe = d ? "auto" : "none", ce = parseFloat(L.borderWidth) || 0, Ce = {
278
- position: v ? "absolute" : "fixed",
279
- left: `${c.left}px`,
280
- top: `${c.top}px`,
281
- opacity: ye,
282
- pointerEvents: xe,
283
- transform: `translate3d(0,${Ee},0)`,
284
- transition: `opacity ${Y}ms ease, transform ${Y}ms ease`,
285
- zIndex: a ? 70 : 60
286
- }, Le = ge(n) ? n(pe) : n, ke = {
287
+ const Le = f && !p ? 0.35 : !p && !f || p && !ie ? 0 : 1, ke = f && !p || p && ie && !ve ? "0" : d.placement === "below" ? "-6px" : "6px", Se = p ? "auto" : "none", fe = parseFloat(k.borderWidth) || 0, Oe = {
288
+ position: h ? "absolute" : "fixed",
289
+ top: 0,
290
+ left: 0,
291
+ pointerEvents: Se,
292
+ zIndex: f ? 70 : 60,
293
+ willChange: "transform"
294
+ }, Ie = {
295
+ opacity: Le,
296
+ transform: `translate3d(0,${ke},0)`,
297
+ transition: `opacity ${ee}ms ease, transform ${ee}ms ease`
298
+ }, Re = Ke(n) ? n(he) : n, Te = {
287
299
  width: E,
288
- height: j,
289
- left: `${se}px`,
290
- top: c.placement === "below" ? `-${j}px` : void 0,
291
- bottom: c.placement === "above" ? `-${j}px` : void 0,
300
+ height: N,
301
+ left: `${ae}px`,
302
+ top: d.placement === "below" ? `-${N}px` : void 0,
303
+ bottom: d.placement === "above" ? `-${N}px` : void 0,
292
304
  overflow: "visible"
293
- }, Se = L.backgroundColor || (a ? "var(--error-500)" : "var(--neutral-800)"), Ie = L.borderColor || void 0, Oe = parseFloat(L.borderWidth) || 0, Re = L.borderStyle.includes("dash") ? "4 2" : L.borderStyle.includes("dot") ? "1 2" : void 0, Te = u === "left" ? c.placement === "below" ? "rounded-tl-none" : "rounded-bl-none" : u === "right" ? c.placement === "below" ? "rounded-tr-none" : "rounded-br-none" : "", We = Be(
305
+ }, We = k.backgroundColor || (f ? "var(--error-500)" : "var(--neutral-800)"), Ae = k.borderColor || void 0, Pe = parseFloat(k.borderWidth) || 0, je = k.borderStyle.includes("dash") ? "4 2" : k.borderStyle.includes("dot") ? "1 2" : void 0, Ne = $ ? "" : l === "left" ? d.placement === "below" ? "rounded-tl-none" : "rounded-bl-none" : l === "right" ? d.placement === "below" ? "rounded-tr-none" : "rounded-br-none" : "", Fe = Me(
294
306
  "relative pointer-events-auto rounded-lg border shadow-2xl",
295
- Te,
296
- a ? "bg-neutral-medium-default opacity-80! border-error-default-default border " : "bg-neutral-medium-default border-neutral-800/60",
297
- K
298
- ), Pe = /* @__PURE__ */ m.jsxs(
307
+ Ne,
308
+ f ? "bg-neutral-medium-default opacity-80! border-error-default-default border " : "bg-neutral-medium-default border-neutral-800/60",
309
+ re
310
+ ), $e = /* @__PURE__ */ a.jsx(
299
311
  "div",
300
312
  {
301
- ref: C,
302
- className: We,
303
- style: Ce,
304
- onMouseEnter: ve,
305
- onMouseLeave: we,
306
- "data-placement": c.placement,
313
+ ref: G,
314
+ style: Oe,
307
315
  "aria-hidden": !P,
308
- children: [
309
- /* @__PURE__ */ m.jsx("div", { className: "absolute", "aria-hidden": "true", style: ke, children: /* @__PURE__ */ m.jsx(
310
- "svg",
311
- {
312
- width: E,
313
- height: j,
314
- viewBox: `0 0 ${E} ${j}`,
315
- role: "presentation",
316
- children: /* @__PURE__ */ m.jsx(
317
- "polygon",
318
- {
319
- fill: Se,
320
- points: qe(c.placement, u),
321
- stroke: Ie,
322
- strokeWidth: Oe,
323
- vectorEffect: "non-scaling-stroke",
324
- strokeDasharray: Re
325
- }
326
- )
327
- }
328
- ) }),
329
- ce > 0 && /* @__PURE__ */ m.jsx(
330
- "div",
331
- {
332
- "aria-hidden": "true",
333
- style: {
334
- position: "absolute",
335
- left: `${se}px`,
336
- width: `${E}px`,
337
- height: `${ce}px`,
338
- background: L.backgroundColor || "transparent",
339
- top: c.placement === "below" ? "-1px" : void 0,
340
- bottom: c.placement === "above" ? "-1px" : void 0,
341
- pointerEvents: "none",
342
- zIndex: 1
343
- }
344
- }
345
- ),
346
- Le
347
- ]
316
+ children: /* @__PURE__ */ a.jsxs(
317
+ "div",
318
+ {
319
+ ref: L,
320
+ className: Fe,
321
+ style: Ie,
322
+ onMouseEnter: Ee,
323
+ onMouseLeave: Ce,
324
+ "data-placement": d.placement,
325
+ children: [
326
+ !$ && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
327
+ /* @__PURE__ */ a.jsx("div", { className: "absolute", "aria-hidden": "true", style: Te, children: /* @__PURE__ */ a.jsx(
328
+ "svg",
329
+ {
330
+ width: E,
331
+ height: N,
332
+ viewBox: `0 0 ${E} ${N}`,
333
+ role: "presentation",
334
+ children: /* @__PURE__ */ a.jsx(
335
+ "polygon",
336
+ {
337
+ fill: We,
338
+ points: Qe(d.placement, l),
339
+ stroke: Ae,
340
+ strokeWidth: Pe,
341
+ vectorEffect: "non-scaling-stroke",
342
+ strokeDasharray: je
343
+ }
344
+ )
345
+ }
346
+ ) }),
347
+ fe > 0 && /* @__PURE__ */ a.jsx(
348
+ "div",
349
+ {
350
+ "aria-hidden": "true",
351
+ style: {
352
+ position: "absolute",
353
+ left: `${ae}px`,
354
+ width: `${E}px`,
355
+ height: `${fe}px`,
356
+ background: k.backgroundColor || "transparent",
357
+ top: d.placement === "below" ? "-1px" : void 0,
358
+ bottom: d.placement === "above" ? "-1px" : void 0,
359
+ pointerEvents: "none",
360
+ zIndex: 1
361
+ }
362
+ }
363
+ )
364
+ ] }),
365
+ Re
366
+ ]
367
+ }
368
+ )
348
369
  }
349
- ), je = a && D ? /* @__PURE__ */ m.jsxs(
370
+ ), He = f && g ? /* @__PURE__ */ a.jsxs(
350
371
  "div",
351
372
  {
352
373
  className: "pointer-events-none text-center bg-red-500/90 text-red-200 rounded-lg px-2 py-1 text-[8px] font-semibold shadow-lg z-50",
353
374
  style: {
354
375
  position: "fixed",
355
- top: D.top - 30,
356
- left: D.left - 20
376
+ top: g.top - 30,
377
+ left: g.left - 20
357
378
  },
358
379
  children: [
359
380
  "Popover Trigger: ",
360
- /* @__PURE__ */ m.jsx("br", {}),
381
+ /* @__PURE__ */ a.jsx("br", {}),
361
382
  " ",
362
- /* @__PURE__ */ m.jsx("span", { className: "text-white text-[10px]", children: r })
383
+ /* @__PURE__ */ a.jsx("span", { className: "text-white text-[10px]", children: r })
363
384
  ]
364
385
  }
365
386
  ) : null;
366
- return /* @__PURE__ */ m.jsx(m.Fragment, { children: ze(
367
- /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
368
- Pe,
369
- je
387
+ return /* @__PURE__ */ a.jsx(a.Fragment, { children: Ge(
388
+ /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
389
+ $e,
390
+ He
370
391
  ] }),
371
- ie
392
+ de
372
393
  ) });
373
394
  };
374
395
  export {
375
- et as default
396
+ st as default
376
397
  };