prometeo-design-system 7.4.7 → 7.4.8

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,7 +1,7 @@
1
1
  import { j as t } from "./jsx-runtime-GkKLlHH4.js";
2
2
  import { c as o } from "./cn-B6yFEsav.js";
3
- import { memo as P, forwardRef as E, useCallback as G } from "react";
4
- import { useDropzone as H } from "react-dropzone";
3
+ import { memo as E, forwardRef as G, useCallback as H } from "react";
4
+ import { useDropzone as P } from "react-dropzone";
5
5
  import _ from "./CardBackground.es.js";
6
6
  import q from "./PlainTooltip.es.js";
7
7
  import K from "./HelperComponent.es.js";
@@ -77,7 +77,7 @@ const W = i(
77
77
  return `Máximo ${e} ${e === 1 ? "archivo" : "archivos"} permitido${e === 1 ? "" : "s"}`;
78
78
  const s = r.length;
79
79
  return s === 1 ? "El archivo no pudo cargarse" : `${s} archivos no pudieron cargarse`;
80
- }, ee = (r, e) => e ? "reject" : r ? "active" : "idle", w = E(
80
+ }, ee = (r, e) => e ? "reject" : r ? "active" : "idle", w = G(
81
81
  ({
82
82
  onFilesAccepted: r,
83
83
  onFilesRejected: e,
@@ -95,7 +95,7 @@ const W = i(
95
95
  cardBackground: b,
96
96
  ...C
97
97
  }, M) => {
98
- const D = G(
98
+ const D = H(
99
99
  (j, y) => {
100
100
  j.length > 0 && r?.(j), y.length > 0 && e?.(y);
101
101
  },
@@ -106,7 +106,7 @@ const W = i(
106
106
  isDragActive: k,
107
107
  isDragReject: A,
108
108
  fileRejections: g
109
- } = H({
109
+ } = P({
110
110
  onDrop: D,
111
111
  accept: m,
112
112
  maxFiles: h,
@@ -213,7 +213,7 @@ const W = i(
213
213
  }
214
214
  );
215
215
  w.displayName = "AttachInput";
216
- const ue = P(w);
216
+ const ue = E(w);
217
217
  export {
218
218
  ue as AttachInput,
219
219
  ue as default
@@ -1,6 +1,6 @@
1
1
  import { j as n } from "./jsx-runtime-GkKLlHH4.js";
2
2
  import { memo as F, forwardRef as G, useMemo as H, isValidElement as I } from "react";
3
- import { i as m } from "./iconUtils-rTOfKDxE.js";
3
+ import { i as v } from "./iconUtils-rTOfKDxE.js";
4
4
  import J from "./Spinner.es.js";
5
5
  import { c as x } from "./index-BOQuZ0gG.js";
6
6
  import { c as h } from "./cn-B6yFEsav.js";
@@ -151,8 +151,8 @@ const u = {
151
151
  variants: {
152
152
  size: {
153
153
  small: "radius-small",
154
- medium: "radius-small",
155
- large: "radius-medium"
154
+ medium: "radius-medium",
155
+ large: "radius-large"
156
156
  },
157
157
  variant: {
158
158
  fill: "",
@@ -201,7 +201,7 @@ const u = {
201
201
  color: "brand",
202
202
  animation: !0
203
203
  }
204
- }), v = x(w.icon, {
204
+ }), m = x(w.icon, {
205
205
  variants: {
206
206
  size: {
207
207
  small: u.small.icon,
@@ -285,10 +285,10 @@ const u = {
285
285
  let a = null;
286
286
  if (r)
287
287
  if (I(r))
288
- m(r.type) ? a = /* @__PURE__ */ n.jsx(
288
+ v(r.type) ? a = /* @__PURE__ */ n.jsx(
289
289
  "span",
290
290
  {
291
- className: v({
291
+ className: m({
292
292
  size: o,
293
293
  variant: s,
294
294
  color: c,
@@ -301,10 +301,10 @@ const u = {
301
301
  else if (typeof r == "function")
302
302
  try {
303
303
  const t = r();
304
- I(t) && (m(t.type) ? a = /* @__PURE__ */ n.jsx(
304
+ I(t) && (v(t.type) ? a = /* @__PURE__ */ n.jsx(
305
305
  "span",
306
306
  {
307
- className: v({
307
+ className: m({
308
308
  size: o,
309
309
  variant: s,
310
310
  color: c,
@@ -317,10 +317,10 @@ const u = {
317
317
  } catch {
318
318
  a = null;
319
319
  }
320
- else typeof r == "object" && (m(r) ? a = /* @__PURE__ */ n.jsx(
320
+ else typeof r == "object" && (v(r) ? a = /* @__PURE__ */ n.jsx(
321
321
  "span",
322
322
  {
323
- className: v({
323
+ className: m({
324
324
  size: o,
325
325
  variant: s,
326
326
  color: c,
@@ -330,12 +330,12 @@ const u = {
330
330
  children: r
331
331
  }
332
332
  ) : a = r);
333
- else if (b && m(b)) {
333
+ else if (b && v(b)) {
334
334
  const t = b;
335
335
  a = /* @__PURE__ */ n.jsx(
336
336
  "span",
337
337
  {
338
- className: v({
338
+ className: m({
339
339
  size: o,
340
340
  variant: s,
341
341
  color: c,
@@ -1,21 +1,23 @@
1
1
  import { j as a } from "./jsx-runtime-GkKLlHH4.js";
2
- import { i as _ } from "./iconUtils-rTOfKDxE.js";
2
+ import { i as U } from "./iconUtils-rTOfKDxE.js";
3
3
  import { c as d } from "./cn-B6yFEsav.js";
4
4
  import { c as m } from "./index-BOQuZ0gG.js";
5
- import { memo as g, forwardRef as j, useMemo as h } from "react";
6
- import y from "./CheckBox.es.js";
7
- import U from "./Divider.es.js";
8
- import { ChevronDown as F } from "./Icons/ChevronDown.es.js";
9
- import { A as K } from "./AvatarBase-D6H-sXbg.js";
10
- const M = {
5
+ import { memo as x, forwardRef as C, useMemo as v } from "react";
6
+ import F from "./CheckBox.es.js";
7
+ import K from "./Divider.es.js";
8
+ import M from "./RadioButton.es.js";
9
+ import Z from "./Check.es.js";
10
+ import { ChevronDown as q } from "./Icons/ChevronDown.es.js";
11
+ import { A as G } from "./AvatarBase-D6H-sXbg.js";
12
+ const H = {
11
13
  size: "small",
12
14
  name: "A B"
13
- }, Z = g(function({
15
+ }, J = x(function({
14
16
  avatarProps: e,
15
- className: t
17
+ className: s
16
18
  }) {
17
- return /* @__PURE__ */ a.jsx(K, { ...e, className: d(t, "shrink-0") });
18
- }), q = m("group flex flex-col w-full py-1 gap-2 ", {
19
+ return /* @__PURE__ */ a.jsx(G, { ...e, className: d(s, "shrink-0") });
20
+ }), Q = m("group flex flex-col w-full py-1 gap-2 ", {
19
21
  variants: {
20
22
  size: {
21
23
  small: "",
@@ -23,7 +25,7 @@ const M = {
23
25
  large: ""
24
26
  }
25
27
  }
26
- }), G = m("flex items-center gap-2 transition-all duration-300 ease-in-out", {
28
+ }), W = m("flex items-center gap-2 transition-all duration-300 ease-in-out", {
27
29
  variants: {
28
30
  size: {
29
31
  small: "p-1 pl-2 radius-medium",
@@ -49,7 +51,7 @@ const M = {
49
51
  class: "bg-transparent group-hover:bg-transparent group-active:bg-transparent cursor-default"
50
52
  }
51
53
  ]
52
- }), S = m(" transition-all duration-300 ease-in-out", {
54
+ }), j = m(" transition-all duration-300 ease-in-out", {
53
55
  variants: {
54
56
  isSelected: {
55
57
  true: "",
@@ -72,7 +74,7 @@ const M = {
72
74
  class: "icon-neutral-tertiary-default group-hover:icon-neutral-tertiary-hover group-active:icon-neutral-tertiary-pressed"
73
75
  }
74
76
  ]
75
- }), H = "flex gap-1 items-center flex-1 overflow-hidden", J = m("flex flex-col gap-0 p-0 overflow-hidden", {
77
+ }), X = "flex gap-1 items-center flex-1 overflow-hidden", Y = m("flex flex-col gap-0 p-0 overflow-hidden", {
76
78
  variants: {
77
79
  size: {
78
80
  small: "",
@@ -80,7 +82,7 @@ const M = {
80
82
  large: ""
81
83
  }
82
84
  }
83
- }), Q = m("transition-all duration-300 ease-in-out text-left truncate", {
85
+ }), $ = m("transition-all duration-300 ease-in-out text-left truncate", {
84
86
  variants: {
85
87
  size: {
86
88
  small: "",
@@ -144,7 +146,7 @@ const M = {
144
146
  class: "text-disabled-default group-hover:text-disabled-default group-active:text-disabled-default"
145
147
  }
146
148
  ]
147
- }), W = m("text-left transition-all duration-300 ease-in-out truncate", {
149
+ }), ee = m("text-left transition-all duration-300 ease-in-out truncate", {
148
150
  variants: {
149
151
  size: {
150
152
  small: "pyrion-fonts-body-xsmall ",
@@ -184,83 +186,84 @@ const M = {
184
186
  class: ""
185
187
  }
186
188
  ]
187
- }), C = {
189
+ }), k = {
188
190
  small: 16,
189
191
  medium: 20,
190
192
  large: 24
191
- }, X = g(function({
193
+ }, ae = x(function({
192
194
  icon: e,
193
- size: t,
194
- className: r,
195
- onClick: n
195
+ size: s,
196
+ className: l,
197
+ onClick: i
196
198
  }) {
197
- const s = (f) => {
198
- f.preventDefault(), n(f);
199
+ const t = (f) => {
200
+ f.preventDefault(), i(f);
199
201
  };
200
- return /* @__PURE__ */ a.jsx("button", { type: "button", onClick: s, className: d("cursor-pointer", r), children: /* @__PURE__ */ a.jsx(e, { size: C[t] }) });
202
+ return /* @__PURE__ */ a.jsx("button", { type: "button", onClick: t, className: d("cursor-pointer", l), children: /* @__PURE__ */ a.jsx(e, { size: k[s] }) });
201
203
  });
202
- function z(i, e, t, r) {
203
- let n = null;
204
- return _(i) && (n = i), n ? r ? /* @__PURE__ */ a.jsx(
205
- X,
204
+ function z(n, e, s, l) {
205
+ let i = null;
206
+ return U(n) && (i = n), i ? l ? /* @__PURE__ */ a.jsx(
207
+ ae,
206
208
  {
207
- icon: n,
209
+ icon: i,
208
210
  size: e,
209
- className: t,
210
- onClick: r
211
+ className: s,
212
+ onClick: l
211
213
  }
212
- ) : /* @__PURE__ */ a.jsx(n, { size: C[e], className: t }) : /* @__PURE__ */ a.jsx("span", { className: d("size-6 invisible") });
214
+ ) : /* @__PURE__ */ a.jsx(i, { size: k[e], className: s }) : /* @__PURE__ */ a.jsx("span", { className: d("size-6 invisible") });
213
215
  }
214
- const Y = j(({ elementType: i, ...e }, t) => {
215
- const r = d("menu-list-item", e.className);
216
- return i === "button" ? /* @__PURE__ */ a.jsx("button", { ref: t, ...e, className: r, children: e.children }) : i === "a" ? /* @__PURE__ */ a.jsx("a", { ref: t, ...e, className: r, children: e.children }) : /* @__PURE__ */ a.jsx("div", { ref: t, ...e, className: r, children: e.children });
217
- }), de = g(j(
218
- function(e, t) {
216
+ const te = C(({ elementType: n, ...e }, s) => {
217
+ const l = d("menu-list-item", e.className);
218
+ return n === "button" ? /* @__PURE__ */ a.jsx("button", { ref: s, ...e, className: l, children: e.children }) : n === "a" ? /* @__PURE__ */ a.jsx("a", { ref: s, ...e, className: l, children: e.children }) : /* @__PURE__ */ a.jsx("div", { ref: s, ...e, className: l, children: e.children });
219
+ }), be = x(C(
220
+ function(e, s) {
219
221
  const {
220
- size: r = "medium",
221
- elementType: n = "div",
222
- isSelected: s = !1,
222
+ size: l = "medium",
223
+ elementType: i = "div",
224
+ isSelected: t = !1,
223
225
  showDivider: f = !0,
224
- disabled: l = !1,
225
- slot: $,
226
+ disabled: r = !1,
227
+ slot: se,
226
228
  icon: N,
227
229
  leadingIconClassName: I,
228
- trailingIconClassName: k,
229
- checkbox: T,
230
- showSelectionComponent: A,
231
- leadingIcon: V,
232
- leadingSlot: p,
233
- showTrailingIcon: w,
234
- trailingIcon: D,
235
- onTrailingIconClick: L,
230
+ trailingIconClassName: T,
231
+ checkbox: A,
232
+ showSelectionComponent: V,
233
+ leadingIcon: w,
234
+ leadingSlot: b,
235
+ showTrailingIcon: D,
236
+ trailingIcon: L,
237
+ onTrailingIconClick: P,
236
238
  avatarProps: o,
237
- role: P,
238
- ...E
239
- } = e, R = t, b = !!(T || A), v = V || N, c = r ?? "small", x = typeof p == "function" ? p({ isSelected: s, disabled: l, checkbox: b }) : p, B = h(
239
+ role: R,
240
+ selectionComponent: p,
241
+ ...B
242
+ } = e, E = s, g = !!(A || V), h = w || N, c = l ?? "small", y = typeof b == "function" ? b({ isSelected: t, disabled: r, checkbox: g }) : b, O = v(
240
243
  () => !!o && ("imageUrl" in o || "name" in o),
241
244
  [o]
242
- ), O = h(
243
- () => ({ ...M, ...o }),
245
+ ), _ = v(
246
+ () => ({ ...H, ...o }),
244
247
  [o?.imageUrl, o?.name]
245
- );
248
+ ), S = v(() => p === "checkbox" ? /* @__PURE__ */ a.jsx(F, { checked: t, readOnly: !0, disabled: r }) : p === "radio-button" ? /* @__PURE__ */ a.jsx(M, { checked: t, readOnly: !0, disabled: r }) : p === "check" ? /* @__PURE__ */ a.jsx(Z, { checked: t, readOnly: !0, disabled: r }) : null, [p, t, r]);
246
249
  return /* @__PURE__ */ a.jsxs(
247
- Y,
250
+ te,
248
251
  {
249
- ref: R,
250
- elementType: n,
251
- ...E,
252
- role: P ?? "menuitem",
253
- className: q({ size: c }),
254
- "aria-disabled": l ? "true" : "false",
255
- "data-selected": s ? "true" : "false",
252
+ ref: E,
253
+ elementType: i,
254
+ ...B,
255
+ role: R ?? "menuitem",
256
+ className: Q({ size: c }),
257
+ "aria-disabled": r ? "true" : "false",
258
+ "data-selected": t ? "true" : "false",
256
259
  children: [
257
- /* @__PURE__ */ a.jsxs("div", { className: G({ size: c, isSelected: s, disabled: l }), children: [
258
- b && (e.onSelectionClick ? /* @__PURE__ */ a.jsx(
260
+ /* @__PURE__ */ a.jsxs("div", { className: W({ size: c, isSelected: t, disabled: r }), children: [
261
+ g && (e.onSelectionClick ? /* @__PURE__ */ a.jsx(
259
262
  "span",
260
263
  {
261
264
  "data-selection-click": !0,
262
265
  role: "checkbox",
263
- "aria-checked": s,
266
+ "aria-checked": t,
264
267
  onClick: (u) => {
265
268
  u.stopPropagation(), e.onSelectionClick?.();
266
269
  },
@@ -269,29 +272,29 @@ const Y = j(({ elementType: i, ...e }, t) => {
269
272
  },
270
273
  tabIndex: 0,
271
274
  className: "cursor-pointer",
272
- children: /* @__PURE__ */ a.jsx(y, { checked: s, readOnly: !0, disabled: l })
275
+ children: S
273
276
  }
274
- ) : /* @__PURE__ */ a.jsx(y, { checked: s, readOnly: !0, disabled: l })),
275
- x ?? (!b && v && z(
276
- v,
277
+ ) : S),
278
+ y ?? (!g && h && z(
279
+ h,
277
280
  c,
278
- d(S({ isSelected: s, disabled: l }), I)
281
+ d(j({ isSelected: t, disabled: r }), I)
279
282
  )),
280
- /* @__PURE__ */ a.jsxs("div", { className: H, children: [
281
- B && /* @__PURE__ */ a.jsx(Z, { avatarProps: O }),
282
- /* @__PURE__ */ a.jsxs("div", { className: J({ size: c }), children: [
283
- e.label && /* @__PURE__ */ a.jsx("p", { className: d(Q({ size: c, isSelected: s, disabled: l }), e.labelClassName), children: e.label }),
284
- e.supportingText && /* @__PURE__ */ a.jsx("p", { title: e.supportingText, className: W({ size: c, isSelected: s, disabled: l }), children: e.supportingText })
283
+ /* @__PURE__ */ a.jsxs("div", { className: X, children: [
284
+ O && /* @__PURE__ */ a.jsx(J, { avatarProps: _ }),
285
+ /* @__PURE__ */ a.jsxs("div", { className: Y({ size: c }), children: [
286
+ e.label && /* @__PURE__ */ a.jsx("p", { className: d($({ size: c, isSelected: t, disabled: r }), e.labelClassName), children: e.label }),
287
+ e.supportingText && /* @__PURE__ */ a.jsx("p", { title: e.supportingText, className: ee({ size: c, isSelected: t, disabled: r }), children: e.supportingText })
285
288
  ] })
286
289
  ] }),
287
- z(D || (w ? F : null), "large", d(S({ isSelected: s, disabled: l }), k), L)
290
+ z(L || (D ? q : null), "large", d(j({ isSelected: t, disabled: r }), T), P)
288
291
  ] }),
289
- f && /* @__PURE__ */ a.jsx(U, {})
292
+ f && /* @__PURE__ */ a.jsx(K, {})
290
293
  ]
291
294
  }
292
295
  );
293
296
  }
294
297
  ));
295
298
  export {
296
- de as default
299
+ be as default
297
300
  };
@@ -1,72 +1,93 @@
1
- import { j as y } from "./jsx-runtime-GkKLlHH4.js";
2
- import { c as _ } from "./cn-B6yFEsav.js";
3
- import { memo as j, useRef as v, useCallback as A, useEffect as u } from "react";
4
- import { createPortal as C } from "react-dom";
5
- const G = ({ title: w, children: p, delayToShow: x = 500, delayToClose: R = 1e3, className: B, attachToParent: d = !1, disabled: D = !1 }) => {
6
- const s = v(null), r = v(null), n = v(null), o = A(() => {
7
- if (typeof window > "u")
8
- return;
9
- const e = r.current, i = s.current;
10
- if (!e || !i)
11
- return;
12
- const l = window.getComputedStyle(e).display, a = e.style.display, f = e.style.visibility, m = e.style.translate, h = l === "none";
13
- h && (e.style.visibility = "hidden", e.style.display = "block"), m && e.style.removeProperty("translate");
14
- const E = i.getBoundingClientRect();
15
- d ? (e.style.removeProperty("position"), e.style.removeProperty("left"), e.style.removeProperty("top")) : (e.style.setProperty("position", "fixed"), e.style.setProperty("left", `${E.right}px`), e.style.setProperty("top", `${E.bottom}px`));
16
- const c = e.getBoundingClientRect(), I = window.innerWidth, N = window.innerHeight, b = Math.max(0, 0 - c.left), M = Math.max(0, c.right - I), L = Math.max(0, 0 - c.top), P = Math.max(0, c.bottom - N), O = b > 0 ? b + 16 : M > 0 ? -(M + 16) : 0, T = L > 0 ? L + 16 : P > 0 ? -(P + 16) : 0;
17
- O === 0 && T === 0 ? e.style.removeProperty("translate") : e.style.setProperty("translate", `${O}px ${T}px`), h && (e.style.display = a, e.style.visibility = f);
18
- }, [d]);
19
- if (u(() => {
20
- const t = s.current, e = r.current;
21
- if (!t || !e)
22
- return;
23
- const i = (f, m) => {
24
- n.current = setTimeout(() => {
25
- m();
26
- }, f);
27
- }, l = () => {
28
- n.current && clearTimeout(n.current), o(), i(x, () => {
29
- r.current?.classList.add("visible");
30
- });
31
- }, a = () => {
32
- n.current && clearTimeout(n.current), i(R, () => {
33
- r.current?.classList.remove("visible");
34
- });
1
+ import { j as R } from "./jsx-runtime-GkKLlHH4.js";
2
+ import { c as N } from "./cn-B6yFEsav.js";
3
+ import { u as O } from "./useFloatingPosition-CSrirTF5.js";
4
+ import { memo as z, useState as A, useRef as d, useId as F, useCallback as u, useEffect as p, Children as K, isValidElement as S, cloneElement as V } from "react";
5
+ import { createPortal as _ } from "react-dom";
6
+ const q = ({
7
+ title: j,
8
+ children: n,
9
+ placement: k = "top",
10
+ offset: I = 6,
11
+ delayToShow: v = 500,
12
+ delayToClose: y = 1e3,
13
+ className: P,
14
+ attachToParent: g = !1,
15
+ disabled: a = !1,
16
+ ref: s
17
+ }) => {
18
+ const [o, c] = A(!1), m = d(null), E = d(null), r = d(null), f = F(), { floatingStyles: w, isPositioned: C } = O({
19
+ triggerRef: m,
20
+ floatingRef: E,
21
+ placement: k,
22
+ offset: I,
23
+ attachToParent: g,
24
+ enabled: o
25
+ }), t = u(() => {
26
+ r.current && (clearTimeout(r.current), r.current = null);
27
+ }, []), i = u(() => {
28
+ t(), r.current = setTimeout(() => c(!0), v);
29
+ }, [t, v]), l = u(() => {
30
+ t(), r.current = setTimeout(() => c(!1), y);
31
+ }, [t, y]), b = u(() => {
32
+ t(), c(!1);
33
+ }, [t]), B = u(
34
+ (e) => {
35
+ m.current = e, typeof s == "function" ? s(e) : s && (s.current = e);
36
+ },
37
+ [s]
38
+ );
39
+ if (p(() => {
40
+ const e = m.current;
41
+ if (!(!e || a))
42
+ return e.addEventListener("mouseenter", i), e.addEventListener("mouseleave", l), e.addEventListener("focusin", i), e.addEventListener("focusout", l), () => {
43
+ e.removeEventListener("mouseenter", i), e.removeEventListener("mouseleave", l), e.removeEventListener("focusin", i), e.removeEventListener("focusout", l);
44
+ };
45
+ }, [a, i, l]), p(() => {
46
+ if (!o) return;
47
+ const e = (D) => {
48
+ D.key === "Escape" && b();
35
49
  };
36
- return t.addEventListener("mouseenter", l), t.addEventListener("mouseleave", a), () => {
37
- t.removeEventListener("mouseenter", l), t.removeEventListener("mouseleave", a);
38
- };
39
- }, [x, R, o]), u(() => {
40
- o();
41
- }, [o, w]), u(() => {
42
- if (typeof window > "u")
43
- return;
44
- const t = () => {
45
- r.current && r.current.classList.contains("visible") && o();
46
- };
47
- return window.addEventListener("resize", t), window.addEventListener("scroll", t, !0), () => {
48
- window.removeEventListener("resize", t), window.removeEventListener("scroll", t, !0);
49
- };
50
- }, [o]), u(() => () => {
51
- n.current && clearTimeout(n.current);
52
- }, []), D) return p;
53
- const g = /* @__PURE__ */ y.jsx("span", { ref: r, className: _(
54
- "plain-tooltip ",
55
- "absolute z-999",
56
- "bg-neutral-tertiary-default px-2 py-1 radius-small w-max",
57
- "text-neutral-default-default pyrion-fonts-body-small text-balance ",
58
- B,
59
- r.current?.innerText?.length && r.current?.innerText?.length > Math.floor(450 / 10) ? "w-max line-clamp-1" : "max-w-[200px] line-clamp-none"
60
- ), children: w });
61
- return !d && typeof document < "u" ? /* @__PURE__ */ y.jsxs("div", { ref: s, children: [
62
- p,
63
- C(g, document.body)
64
- ] }) : /* @__PURE__ */ y.jsxs("div", { ref: s, children: [
65
- p,
66
- g
67
- ] });
68
- }, $ = j(G);
69
- $.displayName = "PlainTooltip";
50
+ return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
51
+ }, [o, b]), p(() => () => t(), [t]), a) return n;
52
+ const x = K.count(n) === 1 && S(n);
53
+ let L = n;
54
+ if (o && x) {
55
+ const e = n.props["aria-describedby"];
56
+ L = V(n, {
57
+ "aria-describedby": [e, f].filter(Boolean).join(" ")
58
+ });
59
+ }
60
+ const T = /* @__PURE__ */ R.jsx(
61
+ "span",
62
+ {
63
+ ref: E,
64
+ id: f,
65
+ role: "tooltip",
66
+ style: w,
67
+ className: N(
68
+ "tooltip",
69
+ C && "visible",
70
+ "z-999 bg-neutral-tertiary-default px-2 py-1 radius-small",
71
+ "text-neutral-default-default pyrion-fonts-body-small text-balance max-w-[200px]",
72
+ P
73
+ ),
74
+ children: j
75
+ }
76
+ );
77
+ return /* @__PURE__ */ R.jsxs(
78
+ "div",
79
+ {
80
+ ref: B,
81
+ ...o && !x ? { "aria-describedby": f } : void 0,
82
+ children: [
83
+ L,
84
+ o && (g ? T : typeof document < "u" && _(T, document.body))
85
+ ]
86
+ }
87
+ );
88
+ }, G = z(q);
89
+ G.displayName = "Tooltip";
70
90
  export {
71
- $ as default
91
+ G as PlainTooltip,
92
+ G as default
72
93
  };