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.
- package/dist/AttachInput.es.js +6 -6
- package/dist/IconButton.es.js +12 -12
- package/dist/ListItem.es.js +83 -80
- package/dist/PlainTooltip.es.js +90 -69
- package/dist/PyrionLayout.es.js +98 -98
- package/dist/RadioButton.es.js +237 -76
- package/dist/RecurrentDatePicker.es.js +34 -31
- package/dist/SplitButton.es.js +1 -1
- package/dist/Star-D5DrGjoe.js +168 -0
- package/dist/Star.d.ts +6 -0
- package/dist/Star.es.js +5 -0
- package/dist/StarRating.d.ts +6 -0
- package/dist/StarRating.es.js +132 -0
- package/dist/TabSwitch.es.js +17 -17
- package/dist/Tabs.es.js +8 -8
- package/dist/Tooltip.d.ts +6 -0
- package/dist/Tooltip.es.js +5 -0
- package/dist/components/Menu/ListItem.d.ts +2 -1
- package/dist/components/RadioButton/RadioButton.d.ts +12 -14
- package/dist/components/Star/Star.d.ts +27 -0
- package/dist/components/Star/Star.styles.d.ts +21 -0
- package/dist/components/StarRating/StarRating.d.ts +45 -0
- package/dist/components/Tabs/Tab.d.ts +2 -2
- package/dist/components/Tabs/Tabs.d.ts +2 -2
- package/dist/components/Tooltip/Tooltip.d.ts +19 -0
- package/dist/exports/PlainTooltip.d.ts +6 -2
- package/dist/exports/Star.d.ts +3 -0
- package/dist/exports/StarRating.d.ts +3 -0
- package/dist/exports/Tooltip.d.ts +3 -0
- package/dist/index.d.ts +6 -0
- package/dist/prometeo-design-system.es.js +114 -109
- package/dist/styles.css +1 -1
- package/package.json +13 -1
- package/src/styles/base.css +1 -1
- package/dist/components/PlainTooltip/PlainTooltip.d.ts +0 -11
package/dist/AttachInput.es.js
CHANGED
|
@@ -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
|
|
4
|
-
import { useDropzone as
|
|
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 =
|
|
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 =
|
|
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
|
-
} =
|
|
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 =
|
|
216
|
+
const ue = E(w);
|
|
217
217
|
export {
|
|
218
218
|
ue as AttachInput,
|
|
219
219
|
ue as default
|
package/dist/IconButton.es.js
CHANGED
|
@@ -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
|
|
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-
|
|
155
|
-
large: "radius-
|
|
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
|
-
}),
|
|
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
|
-
|
|
288
|
+
v(r.type) ? a = /* @__PURE__ */ n.jsx(
|
|
289
289
|
"span",
|
|
290
290
|
{
|
|
291
|
-
className:
|
|
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) && (
|
|
304
|
+
I(t) && (v(t.type) ? a = /* @__PURE__ */ n.jsx(
|
|
305
305
|
"span",
|
|
306
306
|
{
|
|
307
|
-
className:
|
|
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" && (
|
|
320
|
+
else typeof r == "object" && (v(r) ? a = /* @__PURE__ */ n.jsx(
|
|
321
321
|
"span",
|
|
322
322
|
{
|
|
323
|
-
className:
|
|
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 &&
|
|
333
|
+
else if (b && v(b)) {
|
|
334
334
|
const t = b;
|
|
335
335
|
a = /* @__PURE__ */ n.jsx(
|
|
336
336
|
"span",
|
|
337
337
|
{
|
|
338
|
-
className:
|
|
338
|
+
className: m({
|
|
339
339
|
size: o,
|
|
340
340
|
variant: s,
|
|
341
341
|
color: c,
|
package/dist/ListItem.es.js
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { j as a } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
-
import { i as
|
|
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
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
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
|
-
},
|
|
15
|
+
}, J = x(function({
|
|
14
16
|
avatarProps: e,
|
|
15
|
-
className:
|
|
17
|
+
className: s
|
|
16
18
|
}) {
|
|
17
|
-
return /* @__PURE__ */ a.jsx(
|
|
18
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
189
|
+
}), k = {
|
|
188
190
|
small: 16,
|
|
189
191
|
medium: 20,
|
|
190
192
|
large: 24
|
|
191
|
-
},
|
|
193
|
+
}, ae = x(function({
|
|
192
194
|
icon: e,
|
|
193
|
-
size:
|
|
194
|
-
className:
|
|
195
|
-
onClick:
|
|
195
|
+
size: s,
|
|
196
|
+
className: l,
|
|
197
|
+
onClick: i
|
|
196
198
|
}) {
|
|
197
|
-
const
|
|
198
|
-
f.preventDefault(),
|
|
199
|
+
const t = (f) => {
|
|
200
|
+
f.preventDefault(), i(f);
|
|
199
201
|
};
|
|
200
|
-
return /* @__PURE__ */ a.jsx("button", { type: "button", onClick:
|
|
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(
|
|
203
|
-
let
|
|
204
|
-
return
|
|
205
|
-
|
|
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:
|
|
209
|
+
icon: i,
|
|
208
210
|
size: e,
|
|
209
|
-
className:
|
|
210
|
-
onClick:
|
|
211
|
+
className: s,
|
|
212
|
+
onClick: l
|
|
211
213
|
}
|
|
212
|
-
) : /* @__PURE__ */ a.jsx(
|
|
214
|
+
) : /* @__PURE__ */ a.jsx(i, { size: k[e], className: s }) : /* @__PURE__ */ a.jsx("span", { className: d("size-6 invisible") });
|
|
213
215
|
}
|
|
214
|
-
const
|
|
215
|
-
const
|
|
216
|
-
return
|
|
217
|
-
}),
|
|
218
|
-
function(e,
|
|
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:
|
|
221
|
-
elementType:
|
|
222
|
-
isSelected:
|
|
222
|
+
size: l = "medium",
|
|
223
|
+
elementType: i = "div",
|
|
224
|
+
isSelected: t = !1,
|
|
223
225
|
showDivider: f = !0,
|
|
224
|
-
disabled:
|
|
225
|
-
slot:
|
|
226
|
+
disabled: r = !1,
|
|
227
|
+
slot: se,
|
|
226
228
|
icon: N,
|
|
227
229
|
leadingIconClassName: I,
|
|
228
|
-
trailingIconClassName:
|
|
229
|
-
checkbox:
|
|
230
|
-
showSelectionComponent:
|
|
231
|
-
leadingIcon:
|
|
232
|
-
leadingSlot:
|
|
233
|
-
showTrailingIcon:
|
|
234
|
-
trailingIcon:
|
|
235
|
-
onTrailingIconClick:
|
|
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:
|
|
238
|
-
|
|
239
|
-
|
|
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
|
-
),
|
|
243
|
-
() => ({ ...
|
|
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
|
-
|
|
250
|
+
te,
|
|
248
251
|
{
|
|
249
|
-
ref:
|
|
250
|
-
elementType:
|
|
251
|
-
...
|
|
252
|
-
role:
|
|
253
|
-
className:
|
|
254
|
-
"aria-disabled":
|
|
255
|
-
"data-selected":
|
|
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:
|
|
258
|
-
|
|
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":
|
|
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:
|
|
275
|
+
children: S
|
|
273
276
|
}
|
|
274
|
-
) :
|
|
275
|
-
|
|
276
|
-
|
|
277
|
+
) : S),
|
|
278
|
+
y ?? (!g && h && z(
|
|
279
|
+
h,
|
|
277
280
|
c,
|
|
278
|
-
d(
|
|
281
|
+
d(j({ isSelected: t, disabled: r }), I)
|
|
279
282
|
)),
|
|
280
|
-
/* @__PURE__ */ a.jsxs("div", { className:
|
|
281
|
-
|
|
282
|
-
/* @__PURE__ */ a.jsxs("div", { className:
|
|
283
|
-
e.label && /* @__PURE__ */ a.jsx("p", { className: d(
|
|
284
|
-
e.supportingText && /* @__PURE__ */ a.jsx("p", { title: e.supportingText, className:
|
|
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(
|
|
290
|
+
z(L || (D ? q : null), "large", d(j({ isSelected: t, disabled: r }), T), P)
|
|
288
291
|
] }),
|
|
289
|
-
f && /* @__PURE__ */ a.jsx(
|
|
292
|
+
f && /* @__PURE__ */ a.jsx(K, {})
|
|
290
293
|
]
|
|
291
294
|
}
|
|
292
295
|
);
|
|
293
296
|
}
|
|
294
297
|
));
|
|
295
298
|
export {
|
|
296
|
-
|
|
299
|
+
be as default
|
|
297
300
|
};
|
package/dist/PlainTooltip.es.js
CHANGED
|
@@ -1,72 +1,93 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { c as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
-
|
|
91
|
+
G as PlainTooltip,
|
|
92
|
+
G as default
|
|
72
93
|
};
|