prometeo-design-system 4.3.6 → 4.4.0
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/PyrionLayout.es.js +1 -1
- package/dist/{TabLinks-DxqprStp.js → TabLinks-BjGwvqR9.js} +59 -52
- package/dist/TabLinks.es.js +1 -1
- package/dist/Toast.es.js +175 -134
- package/dist/components/TabLinks/TabLinks.d.ts +2 -1
- package/dist/components/Toaster/Toaster.d.ts +6 -4
- package/dist/prometeo-design-system.es.js +1 -1
- package/package.json +1 -1
package/dist/PyrionLayout.es.js
CHANGED
|
@@ -16,7 +16,7 @@ import Ye from "./UserCard.es.js";
|
|
|
16
16
|
import pe from "./Button.es.js";
|
|
17
17
|
import { Logout as St } from "./Icons/Logout.es.js";
|
|
18
18
|
import jt from "./NotificationCard.es.js";
|
|
19
|
-
import { T as kt, a as Dt } from "./TabLinks-
|
|
19
|
+
import { T as kt, a as Dt } from "./TabLinks-BjGwvqR9.js";
|
|
20
20
|
import { Notifications as Xe } from "./Icons/Notifications.es.js";
|
|
21
21
|
import { Close as _e } from "./Icons/Close.es.js";
|
|
22
22
|
import { Help as Je } from "./Icons/Help.es.js";
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { motion as
|
|
3
|
-
import { memo as
|
|
1
|
+
import { j as n } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
+
import { motion as I } from "framer-motion";
|
|
3
|
+
import { memo as $, useId as w, useRef as z, useEffect as E, isValidElement as L } from "react";
|
|
4
4
|
import { c as d } from "./cn-B6yFEsav.js";
|
|
5
|
-
import
|
|
6
|
-
const
|
|
5
|
+
import M from "./PlainTooltip.es.js";
|
|
6
|
+
const R = /* @__PURE__ */ Symbol.for("react.memo"), S = (e, a, o) => {
|
|
7
7
|
if (!e)
|
|
8
8
|
return null;
|
|
9
9
|
if (typeof e == "function") {
|
|
10
10
|
const i = e;
|
|
11
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ n.jsx(i, { size: o, className: a });
|
|
12
12
|
}
|
|
13
13
|
if (typeof e == "object") {
|
|
14
|
-
if (
|
|
14
|
+
if (L(e))
|
|
15
15
|
return e;
|
|
16
|
-
if ("$$typeof" in e && e.$$typeof ===
|
|
16
|
+
if ("$$typeof" in e && e.$$typeof === R) {
|
|
17
17
|
const i = e;
|
|
18
|
-
return /* @__PURE__ */
|
|
18
|
+
return /* @__PURE__ */ n.jsx(i, { size: o, className: a });
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
return e;
|
|
22
22
|
};
|
|
23
|
-
function
|
|
23
|
+
function v({
|
|
24
24
|
items: e,
|
|
25
25
|
activeTab: a,
|
|
26
|
-
onTabChange:
|
|
26
|
+
onTabChange: o,
|
|
27
27
|
className: i,
|
|
28
|
-
tabClassName:
|
|
28
|
+
tabClassName: l,
|
|
29
29
|
activeTabClassName: s,
|
|
30
|
-
indicatorClassName:
|
|
30
|
+
indicatorClassName: b,
|
|
31
31
|
animated: r = !0,
|
|
32
32
|
renderTab: u
|
|
33
33
|
}) {
|
|
34
|
-
const
|
|
35
|
-
t.disabled ||
|
|
36
|
-
};
|
|
37
|
-
return /* @__PURE__ */
|
|
34
|
+
const p = (t) => {
|
|
35
|
+
t.disabled || o?.(t.id, t);
|
|
36
|
+
}, x = w();
|
|
37
|
+
return /* @__PURE__ */ n.jsx(
|
|
38
38
|
"div",
|
|
39
39
|
{
|
|
40
40
|
className: d(
|
|
41
|
-
"flex flex-row justify-around items-end relative border-b border-neutral-strong-default w-full md:justify-start md:px-10 md:gap-5",
|
|
41
|
+
"flex flex-row justify-around items-end relative border-b border-neutral-strong-default w-full md:justify-start md:px-10 md:gap-5 overflow-hidden",
|
|
42
42
|
i
|
|
43
43
|
),
|
|
44
44
|
role: "tablist",
|
|
45
45
|
children: e?.map((t) => {
|
|
46
|
-
const c = a === t.id,
|
|
47
|
-
return u ? /* @__PURE__ */
|
|
48
|
-
|
|
46
|
+
const c = a === t.id, f = () => p(t), { iconPosition: h = "top", iconSize: m = 24 } = t;
|
|
47
|
+
return u ? /* @__PURE__ */ n.jsx("div", { children: u(t, c, f, t.onIconClick, t.onIconHover, t.iconTooltipTitle, t.iconTooltipProps, t.iconSize) }, t.id) : /* @__PURE__ */ n.jsx(
|
|
48
|
+
H,
|
|
49
49
|
{
|
|
50
50
|
id: t.id,
|
|
51
51
|
title: t.title,
|
|
52
52
|
icon: t.icon,
|
|
53
|
-
iconPosition:
|
|
54
|
-
onClick:
|
|
53
|
+
iconPosition: h,
|
|
54
|
+
onClick: f,
|
|
55
55
|
disabled: t.disabled,
|
|
56
|
-
className:
|
|
56
|
+
className: l,
|
|
57
57
|
isActive: c,
|
|
58
58
|
activeClassName: s,
|
|
59
59
|
animated: r,
|
|
@@ -61,37 +61,43 @@ function j({
|
|
|
61
61
|
onIconClick: t.onIconClick,
|
|
62
62
|
iconTooltipTitle: t.iconTooltipTitle,
|
|
63
63
|
iconTooltipProps: t.iconTooltipProps,
|
|
64
|
-
iconSize:
|
|
65
|
-
indicatorClassName:
|
|
66
|
-
|
|
64
|
+
iconSize: m,
|
|
65
|
+
indicatorClassName: b,
|
|
66
|
+
layoutId: x
|
|
67
|
+
},
|
|
68
|
+
t.id
|
|
67
69
|
);
|
|
68
70
|
})
|
|
69
71
|
}
|
|
70
72
|
);
|
|
71
73
|
}
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
+
v.displayName = "TabLinks";
|
|
75
|
+
const D = $(v, (e, a) => {
|
|
74
76
|
if (e.activeTab !== a.activeTab || e.className !== a.className || e.tabClassName !== a.tabClassName || e.activeTabClassName !== a.activeTabClassName || e.indicatorClassName !== a.indicatorClassName || e.animated !== a.animated || e.onTabChange !== a.onTabChange || e.renderTab !== a.renderTab || e.items.length !== a.items.length)
|
|
75
77
|
return !1;
|
|
76
|
-
for (let
|
|
77
|
-
const i = e.items[
|
|
78
|
-
if (i.id !==
|
|
78
|
+
for (let o = 0; o < e.items.length; o++) {
|
|
79
|
+
const i = e.items[o], l = a.items[o];
|
|
80
|
+
if (i.id !== l.id || i.title !== l.title || i.disabled !== l.disabled || i.description !== l.description)
|
|
79
81
|
return !1;
|
|
80
82
|
}
|
|
81
83
|
return !0;
|
|
82
|
-
}),
|
|
83
|
-
const
|
|
84
|
-
|
|
84
|
+
}), H = ({ id: e, title: a, icon: o, iconPosition: i = "top", onClick: l, disabled: s = !1, className: b, isActive: r, activeClassName: u, onIconHover: p, onIconClick: x, iconTooltipTitle: t, iconTooltipProps: c, iconSize: f = 20, indicatorClassName: h, layoutId: m }) => {
|
|
85
|
+
const y = z(!0);
|
|
86
|
+
E(() => {
|
|
87
|
+
y.current && (y.current = !1);
|
|
88
|
+
}, []);
|
|
89
|
+
const C = (T, g, j, N, k) => j ? /* @__PURE__ */ n.jsx(M, { title: j, ...N, children: /* @__PURE__ */ n.jsx("div", { onMouseEnter: g, onClick: k, children: T }) }) : /* @__PURE__ */ n.jsx("div", { onMouseEnter: g, onClick: k, children: T });
|
|
90
|
+
return /* @__PURE__ */ n.jsxs(
|
|
85
91
|
"button",
|
|
86
92
|
{
|
|
87
|
-
onClick:
|
|
93
|
+
onClick: l,
|
|
88
94
|
disabled: s,
|
|
89
95
|
className: d(
|
|
90
96
|
"group/tablink-item",
|
|
91
97
|
"relative flex flex-col pb-[14px] justify-center items-center h-max px-4 font-medium focus:outline-none transition-colors pt-[14px]",
|
|
92
98
|
s && "hover:text-primary-default-default cursor-pointer",
|
|
93
99
|
s && "opacity-50 cursor-default",
|
|
94
|
-
|
|
100
|
+
b,
|
|
95
101
|
r && u
|
|
96
102
|
),
|
|
97
103
|
tabIndex: s ? -1 : 0,
|
|
@@ -99,12 +105,12 @@ const W = I(j, (e, a) => {
|
|
|
99
105
|
role: "tab",
|
|
100
106
|
"aria-selected": r,
|
|
101
107
|
children: [
|
|
102
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ n.jsxs("div", { className: d(
|
|
103
109
|
"flex items-center gap-0.5",
|
|
104
110
|
i === "left" && "flex-row-reverse",
|
|
105
111
|
i === "top" ? "flex-col-reverse" : "gap-1"
|
|
106
112
|
), children: [
|
|
107
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ n.jsx(
|
|
108
114
|
"label",
|
|
109
115
|
{
|
|
110
116
|
className: d(
|
|
@@ -115,33 +121,34 @@ const W = I(j, (e, a) => {
|
|
|
115
121
|
children: a
|
|
116
122
|
}
|
|
117
123
|
),
|
|
118
|
-
C(
|
|
124
|
+
C(S(o, d(
|
|
119
125
|
"transition-all duration-300 ease-in-out group-hover/tablink-item:text-neutral-medium-hover ",
|
|
120
126
|
r ? "text-primary-default-default prometeo-fonts-title-medium group-hover/tablink-item:text-primary-default-default" : "text-neutral-medium-default prometeo-fonts-body-large"
|
|
121
|
-
),
|
|
127
|
+
), f), p, t, c, x)
|
|
122
128
|
] }),
|
|
123
|
-
r
|
|
124
|
-
|
|
129
|
+
r ? /* @__PURE__ */ n.jsx(
|
|
130
|
+
I.div,
|
|
125
131
|
{
|
|
126
|
-
layoutId: "tab-indicator",
|
|
132
|
+
layoutId: m ? `tab-indicator-${m}` : "tab-indicator",
|
|
133
|
+
id: `tab-indicator-${e}`,
|
|
134
|
+
initial: y.current ? !1 : void 0,
|
|
127
135
|
className: d(
|
|
128
|
-
"absolute
|
|
129
|
-
|
|
136
|
+
"absolute bottom-0 left-1/2 -translate-x-1/2 h-[4px] rounded-t-xl bg-primary-default-default z-10 w-[calc(100%-32px)]",
|
|
137
|
+
h
|
|
130
138
|
),
|
|
131
139
|
transition: {
|
|
132
140
|
type: "spring",
|
|
133
141
|
stiffness: 250,
|
|
134
142
|
damping: 17
|
|
135
|
-
}
|
|
136
|
-
"aria-hidden": "true"
|
|
143
|
+
}
|
|
137
144
|
}
|
|
138
|
-
)
|
|
145
|
+
) : null
|
|
139
146
|
]
|
|
140
147
|
},
|
|
141
|
-
e
|
|
148
|
+
`tablink-${e}`
|
|
142
149
|
);
|
|
143
150
|
};
|
|
144
151
|
export {
|
|
145
|
-
|
|
146
|
-
|
|
152
|
+
D as T,
|
|
153
|
+
H as a
|
|
147
154
|
};
|
package/dist/TabLinks.es.js
CHANGED
package/dist/Toast.es.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { c as
|
|
3
|
-
import
|
|
4
|
-
import { toast as
|
|
1
|
+
import { j as r } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
+
import { c as g } from "./cn-B6yFEsav.js";
|
|
3
|
+
import I, { useRef as j, useEffect as E } from "react";
|
|
4
|
+
import { toast as y } from "sonner";
|
|
5
5
|
import { Info as k } from "./Icons/Info.es.js";
|
|
6
|
-
import { Error as
|
|
7
|
-
import { Cancel as
|
|
8
|
-
import { CheckCircle as
|
|
9
|
-
import
|
|
10
|
-
import { Close as
|
|
11
|
-
const
|
|
6
|
+
import { Error as T } from "./Icons/Error.es.js";
|
|
7
|
+
import { Cancel as M } from "./Icons/Cancel.es.js";
|
|
8
|
+
import { CheckCircle as P } from "./Icons/CheckCircle.es.js";
|
|
9
|
+
import R from "./Button.es.js";
|
|
10
|
+
import { Close as L } from "./Icons/Close.es.js";
|
|
11
|
+
const v = {
|
|
12
12
|
dark: {
|
|
13
13
|
success: {
|
|
14
14
|
container: "border-b-[2px] border-success-default-default",
|
|
15
15
|
iconClass: "text-success-medium-default",
|
|
16
|
-
icon:
|
|
16
|
+
icon: P,
|
|
17
17
|
loading: "bg-success-default-default"
|
|
18
18
|
},
|
|
19
19
|
error: {
|
|
20
20
|
container: "border-b-[2px] border-error-default-default",
|
|
21
21
|
iconClass: "text-error-medium-default",
|
|
22
|
-
icon:
|
|
22
|
+
icon: M,
|
|
23
23
|
loading: "bg-error-default-default"
|
|
24
24
|
},
|
|
25
25
|
warning: {
|
|
26
26
|
container: "border-b-[2px] border-warning-default-default",
|
|
27
27
|
iconClass: "text-warning-medium-default",
|
|
28
|
-
icon:
|
|
28
|
+
icon: T,
|
|
29
29
|
loading: "bg-warning-default-default"
|
|
30
30
|
},
|
|
31
31
|
info: {
|
|
@@ -39,19 +39,19 @@ const y = {
|
|
|
39
39
|
success: {
|
|
40
40
|
container: "",
|
|
41
41
|
iconClass: "text-success-default-pressed",
|
|
42
|
-
icon:
|
|
42
|
+
icon: P,
|
|
43
43
|
loading: "bg-success-default-pressed"
|
|
44
44
|
},
|
|
45
45
|
error: {
|
|
46
46
|
container: "",
|
|
47
47
|
iconClass: "text-error-medium-pressed",
|
|
48
|
-
icon:
|
|
48
|
+
icon: M,
|
|
49
49
|
loading: "bg-error-medium-pressed"
|
|
50
50
|
},
|
|
51
51
|
warning: {
|
|
52
52
|
container: "",
|
|
53
53
|
iconClass: "text-warning-medium-pressed",
|
|
54
|
-
icon:
|
|
54
|
+
icon: T,
|
|
55
55
|
loading: "bg-warning-medium-pressed"
|
|
56
56
|
},
|
|
57
57
|
info: {
|
|
@@ -61,7 +61,7 @@ const y = {
|
|
|
61
61
|
loading: "bg-primary-default-pressed"
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
},
|
|
64
|
+
}, C = {
|
|
65
65
|
dark: {
|
|
66
66
|
container: "bg-neutral-default-default",
|
|
67
67
|
title: "text-neutral-strong-default",
|
|
@@ -74,197 +74,238 @@ const y = {
|
|
|
74
74
|
description: "text-neutral-medium-focused",
|
|
75
75
|
shadow: "0px 0px 2px 0px rgba(0, 0, 0, 0.35),8px 8px 20px 0px rgba(0, 0, 0, 0.3),0px 0px 15px 0px rgba(0, 0, 0, 0.2),0px 0px 20px 0px rgba(21, 21, 21, 0.3) inset,6px 0px 100px 0px rgba(0, 0, 0, 0.05) inset"
|
|
76
76
|
}
|
|
77
|
-
},
|
|
78
|
-
const { title:
|
|
79
|
-
return /* @__PURE__ */
|
|
77
|
+
}, N = (x) => {
|
|
78
|
+
const { title: l, description: f, button: o, id: d, icon: n, variant: i = "info", colorMode: t = "dark", showClose: h = !1, loading: m = !1, loadingTimeout: p = 2500, finishLoader: c = !1, customContent: u } = x;
|
|
79
|
+
return /* @__PURE__ */ r.jsxs(
|
|
80
80
|
"div",
|
|
81
81
|
{
|
|
82
82
|
style: {
|
|
83
|
-
boxShadow:
|
|
83
|
+
boxShadow: C[t].shadow
|
|
84
84
|
},
|
|
85
|
-
className:
|
|
86
|
-
"flex p-3 pb-4 md:w-[485px] md:max-w-[485px] md:min-w-[485px]
|
|
87
|
-
"w-[345px] max-w-[345px] min-w-[345px]
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
className: g(
|
|
86
|
+
"flex p-3 pb-4 md:w-[485px] md:max-w-[485px] md:min-w-[485px] rounded-lg gap-2",
|
|
87
|
+
"w-[345px] max-w-[345px] min-w-[345px] relative",
|
|
88
|
+
// Altura fija solo cuando no hay customContent
|
|
89
|
+
!u && "md:h-[68px] md:max-h-[68px] h-[68px] max-h-[68px]",
|
|
90
|
+
// Cuando hay customContent, permitir crecimiento pero con mínimo
|
|
91
|
+
u && "md:min-h-[68px] min-h-[68px]",
|
|
92
|
+
C[t].container,
|
|
93
|
+
v[t][i].container,
|
|
94
|
+
m && "border-b-0"
|
|
91
95
|
),
|
|
92
96
|
children: [
|
|
93
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ r.jsxs(
|
|
94
98
|
"div",
|
|
95
99
|
{
|
|
96
|
-
className:
|
|
100
|
+
className: g(
|
|
101
|
+
"flex items-start gap-2 flex-1",
|
|
102
|
+
// Restricciones de altura solo cuando no hay customContent
|
|
103
|
+
!u && "justify-start items-center max-h-[38px] h-[38px] overflow-hidden",
|
|
104
|
+
// Cuando hay customContent, permitir crecimiento
|
|
105
|
+
u && "justify-start"
|
|
106
|
+
),
|
|
97
107
|
children: [
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
|
|
108
|
+
/* @__PURE__ */ r.jsx("div", { className: "f shrink-0", style: { color: "inherit" }, children: I.createElement(n || v[t][i].icon, { size: 24, className: v[t][i].iconClass }) }),
|
|
109
|
+
u ? /* @__PURE__ */ r.jsx("div", { className: "flex-1 min-w-0", children: u }) : /* @__PURE__ */ r.jsxs("div", { className: "flex-1 flex flex-col gap-1", children: [
|
|
110
|
+
/* @__PURE__ */ r.jsx("p", { className: g("select-none prometeo-fonts-label-medium md:prometeo-fonts-label-xlarge", C[t].title), children: l }),
|
|
111
|
+
f && /* @__PURE__ */ r.jsx("p", { className: g("select-none prometeo-fonts-body-xsmall md:prometeo-fonts-body-small text-nowrap overflow-ellipsis ", C[t].description), children: f })
|
|
102
112
|
] })
|
|
103
113
|
]
|
|
104
114
|
}
|
|
105
115
|
),
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
116
|
+
m && /* @__PURE__ */ r.jsx(V, { color: i, timeOut: p, finished: c, colorMode: t }),
|
|
117
|
+
o?.label && /* @__PURE__ */ r.jsx("div", { className: "shrink-0", children: /* @__PURE__ */ r.jsx(
|
|
118
|
+
R,
|
|
109
119
|
{
|
|
110
|
-
label:
|
|
120
|
+
label: o?.label,
|
|
111
121
|
onClick: () => {
|
|
112
|
-
|
|
122
|
+
o?.onClick(), y.dismiss(d);
|
|
113
123
|
},
|
|
114
124
|
size: "small",
|
|
115
125
|
color: "secondary"
|
|
116
126
|
}
|
|
117
127
|
) }),
|
|
118
|
-
|
|
119
|
-
|
|
128
|
+
h && /* @__PURE__ */ r.jsx("div", { className: "shrink-0", children: /* @__PURE__ */ r.jsx(
|
|
129
|
+
R,
|
|
120
130
|
{
|
|
121
131
|
onClick: () => {
|
|
122
|
-
|
|
132
|
+
y.dismiss(d);
|
|
123
133
|
},
|
|
124
134
|
label: "",
|
|
125
135
|
size: "small",
|
|
126
136
|
color: "secondary",
|
|
127
|
-
icon: /* @__PURE__ */
|
|
137
|
+
icon: /* @__PURE__ */ r.jsx(L, { className: g(t === "light" ? "text-neutral-medium-focused " : "") }),
|
|
128
138
|
variant: "text",
|
|
129
139
|
animate: !1,
|
|
130
|
-
className:
|
|
140
|
+
className: g(t === "light" ? "hover:bg-neutral-default-hover-light focus:bg-inherit active:bg-neutral-weak-hover " : "")
|
|
131
141
|
}
|
|
132
142
|
) })
|
|
133
143
|
]
|
|
134
144
|
}
|
|
135
145
|
);
|
|
136
|
-
},
|
|
137
|
-
const
|
|
146
|
+
}, V = ({ className: x, color: l, timeOut: f, finished: o, colorMode: d }) => {
|
|
147
|
+
const n = j(0), i = j(Date.now()), t = j(null);
|
|
138
148
|
E(() => {
|
|
139
|
-
if (
|
|
140
|
-
|
|
149
|
+
if (o) {
|
|
150
|
+
n.current = 1, t.current && (t.current.style.width = "100%");
|
|
141
151
|
return;
|
|
142
152
|
}
|
|
143
|
-
|
|
144
|
-
const
|
|
145
|
-
const
|
|
146
|
-
let
|
|
147
|
-
if (
|
|
148
|
-
|
|
153
|
+
i.current = Date.now(), n.current = 0;
|
|
154
|
+
const m = setInterval(() => {
|
|
155
|
+
const p = Date.now() - i.current, c = Math.min(p / f, 1), u = c * 0.95, b = Math.sin(c * Math.PI * 2) * 0.15 + 0.05, w = Math.random() < b;
|
|
156
|
+
let e;
|
|
157
|
+
if (w)
|
|
158
|
+
e = n.current;
|
|
149
159
|
else {
|
|
150
|
-
const
|
|
151
|
-
|
|
160
|
+
const a = (Math.random() - 0.5) * 0.25;
|
|
161
|
+
e = Math.max(n.current, Math.min(0.95, u + a));
|
|
152
162
|
}
|
|
153
|
-
|
|
163
|
+
n.current = e, t.current && (t.current.style.width = `${e * 100}%`), (c >= 1 || o) && clearInterval(m);
|
|
154
164
|
}, 50);
|
|
155
|
-
return () => clearInterval(
|
|
156
|
-
}, [
|
|
157
|
-
const
|
|
158
|
-
return /* @__PURE__ */
|
|
165
|
+
return () => clearInterval(m);
|
|
166
|
+
}, [f, o]);
|
|
167
|
+
const h = v[d][l].loading;
|
|
168
|
+
return /* @__PURE__ */ r.jsx("div", { className: g(
|
|
159
169
|
"absolute bottom-0 translate-y-0 left-0 w-full h-2 overflow-hidden rounded-b-xl",
|
|
160
170
|
'after:content-[""] after:w-[calc(100%-0px)] after:absolute after:bottom-0 after:left-1/2 after:bg-neutral-default-default after:h-2 after:-translate-x-1/2 after:-translate-y-[2px] after:rounded-b-full after:overflow-hidden',
|
|
161
|
-
|
|
162
|
-
), children: /* @__PURE__ */
|
|
171
|
+
x
|
|
172
|
+
), children: /* @__PURE__ */ r.jsx(
|
|
163
173
|
"div",
|
|
164
174
|
{
|
|
165
|
-
ref:
|
|
166
|
-
className:
|
|
175
|
+
ref: t,
|
|
176
|
+
className: g("h-full transition-all duration-300 ease-out", h),
|
|
167
177
|
style: { width: "0%" }
|
|
168
178
|
}
|
|
169
179
|
) });
|
|
170
180
|
};
|
|
171
|
-
function
|
|
172
|
-
const { duration:
|
|
173
|
-
return
|
|
174
|
-
|
|
181
|
+
function G(x, l) {
|
|
182
|
+
const { duration: f = 2500, showClose: o = !1, colorMode: d = "dark", position: n } = l || {};
|
|
183
|
+
return y.custom((i) => /* @__PURE__ */ r.jsx(
|
|
184
|
+
N,
|
|
175
185
|
{
|
|
176
|
-
id:
|
|
177
|
-
variant:
|
|
178
|
-
title:
|
|
179
|
-
description:
|
|
180
|
-
icon:
|
|
181
|
-
button:
|
|
182
|
-
showClose:
|
|
183
|
-
colorMode:
|
|
186
|
+
id: i,
|
|
187
|
+
variant: l?.variant || "success",
|
|
188
|
+
title: x,
|
|
189
|
+
description: l?.description,
|
|
190
|
+
icon: l?.icon,
|
|
191
|
+
button: l?.button,
|
|
192
|
+
showClose: o,
|
|
193
|
+
colorMode: d
|
|
184
194
|
}
|
|
185
195
|
), {
|
|
186
|
-
duration:
|
|
187
|
-
position:
|
|
196
|
+
duration: f,
|
|
197
|
+
position: n,
|
|
188
198
|
unstyled: !0
|
|
189
199
|
});
|
|
190
200
|
}
|
|
191
|
-
const
|
|
201
|
+
const H = (x, l = {}) => {
|
|
192
202
|
const {
|
|
193
|
-
loading:
|
|
194
|
-
success:
|
|
195
|
-
error:
|
|
196
|
-
colorMode:
|
|
197
|
-
position:
|
|
198
|
-
timeOut:
|
|
199
|
-
} =
|
|
200
|
-
let
|
|
201
|
-
const
|
|
202
|
-
|
|
203
|
-
|
|
203
|
+
loading: f,
|
|
204
|
+
success: o,
|
|
205
|
+
error: d,
|
|
206
|
+
colorMode: n = "dark",
|
|
207
|
+
position: i,
|
|
208
|
+
timeOut: t = 5e3
|
|
209
|
+
} = l, h = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null || e === void 0 || typeof e == "object" && ("$$typeof" in e || I.isValidElement(e)), m = { title: "Cargando...", variant: "info", ...f }, p = typeof o == "function" ? { variant: "success", showClose: !0 } : { variant: "success", showClose: !0, ...o }, c = typeof d == "function" ? { variant: "error", showClose: !0 } : { variant: "error", showClose: !0, ...d };
|
|
210
|
+
let u, b = !1;
|
|
211
|
+
const w = (e) => {
|
|
212
|
+
y.custom((a) => /* @__PURE__ */ r.jsx(
|
|
213
|
+
N,
|
|
204
214
|
{
|
|
205
|
-
id:
|
|
206
|
-
...
|
|
207
|
-
colorMode:
|
|
215
|
+
id: a,
|
|
216
|
+
...e,
|
|
217
|
+
colorMode: n
|
|
208
218
|
}
|
|
209
219
|
), {
|
|
210
|
-
id:
|
|
220
|
+
id: u,
|
|
211
221
|
// Usar el mismo id para reemplazar
|
|
212
|
-
duration:
|
|
213
|
-
position:
|
|
222
|
+
duration: e.duration || 1 / 0,
|
|
223
|
+
position: i,
|
|
214
224
|
unstyled: !0
|
|
215
225
|
});
|
|
216
226
|
};
|
|
217
|
-
return
|
|
218
|
-
|
|
227
|
+
return u = y.custom((e) => /* @__PURE__ */ r.jsx(
|
|
228
|
+
N,
|
|
219
229
|
{
|
|
220
|
-
id:
|
|
221
|
-
loadingTimeout:
|
|
230
|
+
id: e,
|
|
231
|
+
loadingTimeout: t,
|
|
222
232
|
loading: !0,
|
|
223
233
|
...m,
|
|
224
|
-
colorMode:
|
|
234
|
+
colorMode: n
|
|
225
235
|
}
|
|
226
236
|
), {
|
|
227
237
|
duration: 1 / 0,
|
|
228
|
-
position:
|
|
238
|
+
position: i,
|
|
229
239
|
unstyled: !0
|
|
230
|
-
}),
|
|
231
|
-
if (b)
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
240
|
+
}), x.then((e) => {
|
|
241
|
+
if (!b)
|
|
242
|
+
return b = !0, w({
|
|
243
|
+
...m,
|
|
244
|
+
loadingTimeout: t,
|
|
245
|
+
loading: !0,
|
|
246
|
+
finishLoader: !0,
|
|
247
|
+
variant: "info",
|
|
248
|
+
duration: 1e3
|
|
249
|
+
}), setTimeout(() => {
|
|
250
|
+
let a;
|
|
251
|
+
if (typeof o == "function") {
|
|
252
|
+
const s = o(e);
|
|
253
|
+
h(s) ? a = {
|
|
254
|
+
...p,
|
|
255
|
+
customContent: s,
|
|
256
|
+
duration: p.duration || 2500
|
|
257
|
+
} : a = {
|
|
258
|
+
variant: "success",
|
|
259
|
+
showClose: !0,
|
|
260
|
+
...s,
|
|
261
|
+
duration: s.duration || 2500
|
|
262
|
+
};
|
|
263
|
+
} else {
|
|
264
|
+
const s = p.title || (typeof e == "string" ? e : "Operación completada con éxito!");
|
|
265
|
+
a = {
|
|
266
|
+
...p,
|
|
267
|
+
title: s,
|
|
268
|
+
duration: p.duration || 2500
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
w(a);
|
|
272
|
+
}, 500), e;
|
|
273
|
+
}).catch((e) => {
|
|
274
|
+
b || (b = !0, w({
|
|
235
275
|
...m,
|
|
236
|
-
loadingTimeout:
|
|
276
|
+
loadingTimeout: t,
|
|
237
277
|
loading: !0,
|
|
238
278
|
finishLoader: !0,
|
|
239
279
|
variant: "info",
|
|
240
280
|
duration: 1e3
|
|
241
281
|
}), setTimeout(() => {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
|
|
282
|
+
let a;
|
|
283
|
+
if (typeof d == "function") {
|
|
284
|
+
const s = d(e);
|
|
285
|
+
h(s) ? a = {
|
|
286
|
+
...c,
|
|
287
|
+
customContent: s,
|
|
288
|
+
duration: c.duration || 2500
|
|
289
|
+
} : a = {
|
|
290
|
+
variant: "error",
|
|
291
|
+
showClose: !0,
|
|
292
|
+
...s,
|
|
293
|
+
duration: s.duration || 2500
|
|
294
|
+
};
|
|
295
|
+
} else {
|
|
296
|
+
const s = c.title || (typeof e == "string" ? e : e.message || "Error!");
|
|
297
|
+
a = {
|
|
298
|
+
...c,
|
|
299
|
+
title: s,
|
|
300
|
+
duration: c.duration || 2500
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
w(a);
|
|
304
|
+
}, 500));
|
|
305
|
+
}), x;
|
|
265
306
|
};
|
|
266
307
|
export {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
308
|
+
N as default,
|
|
309
|
+
H as toastPyrionPromise,
|
|
310
|
+
G as toastpyrion
|
|
270
311
|
};
|
|
@@ -47,5 +47,6 @@ interface TabLinkItemProps {
|
|
|
47
47
|
iconTooltipTitle?: string;
|
|
48
48
|
iconTooltipProps?: PlainTooltipProps;
|
|
49
49
|
iconSize?: number;
|
|
50
|
+
layoutId?: string;
|
|
50
51
|
}
|
|
51
|
-
export declare const TabLinkItem: ({ id, title, icon, iconPosition, onClick, disabled, className, isActive, activeClassName,
|
|
52
|
+
export declare const TabLinkItem: ({ id, title, icon, iconPosition, onClick, disabled, className, isActive, activeClassName, onIconHover, onIconClick, iconTooltipTitle, iconTooltipProps, iconSize, indicatorClassName, layoutId }: TabLinkItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IconComponent } from '../../Icons/types';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
2
3
|
import { ColorMode } from '../Shared/types';
|
|
3
4
|
type ToastElementsProps = {
|
|
4
5
|
container: string;
|
|
@@ -34,15 +35,16 @@ export interface PyrionToastProps {
|
|
|
34
35
|
loading?: boolean;
|
|
35
36
|
loadingTimeout?: number;
|
|
36
37
|
finishLoader?: boolean;
|
|
38
|
+
customContent?: ReactNode;
|
|
37
39
|
}
|
|
38
40
|
declare const PyrionToast: (props: PyrionToastProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
41
|
export default PyrionToast;
|
|
40
42
|
export declare function toastpyrion(title: string, options?: Omit<PyrionToastProps, 'id'>): string | number;
|
|
41
|
-
export declare const toastPyrionPromise: (promise: Promise<
|
|
43
|
+
export declare const toastPyrionPromise: <TData = any, TError = any>(promise: Promise<TData>, options?: {
|
|
42
44
|
loading?: Omit<PyrionToastProps, "id">;
|
|
43
|
-
success?: Omit<PyrionToastProps, "id"
|
|
44
|
-
error?: Omit<PyrionToastProps, "id"
|
|
45
|
+
success?: Omit<PyrionToastProps, "id"> | ((data: TData) => Omit<PyrionToastProps, "id"> | ReactNode);
|
|
46
|
+
error?: Omit<PyrionToastProps, "id"> | ((error: TError) => Omit<PyrionToastProps, "id"> | ReactNode);
|
|
45
47
|
colorMode?: ColorMode;
|
|
46
48
|
position?: ToastPosition;
|
|
47
49
|
timeOut?: number;
|
|
48
|
-
}) => Promise<
|
|
50
|
+
}) => Promise<TData>;
|
|
@@ -21,7 +21,7 @@ import { D as ne } from "./DatePicker-QuBgR5DQ.js";
|
|
|
21
21
|
import { RecurrentDatePicker as me } from "./RecurrentDatePicker.es.js";
|
|
22
22
|
import { RecurrentDatePickerRRule as ie } from "./RecurrentDatePickerRRule.es.js";
|
|
23
23
|
import { Table as ce, TableBody as be, TableCaption as De, TableCell as ve, TableFooter as Te, TableHead as ge, TableHeader as ke, TableRow as he } from "./Table.es.js";
|
|
24
|
-
import { T as Ce } from "./TabLinks-
|
|
24
|
+
import { T as Ce } from "./TabLinks-BjGwvqR9.js";
|
|
25
25
|
import { default as Ee } from "./TextArea.es.js";
|
|
26
26
|
import { default as Re } from "./Tooltip.es.js";
|
|
27
27
|
import { default as Se } from "./Skeleton.es.js";
|