prometeo-design-system 2.4.0 → 2.4.1
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/TabLinks.es.js +29 -28
- package/package.json +1 -1
package/dist/TabLinks.es.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { j as n } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
-
import { motion as
|
|
2
|
+
import { motion as x } from "framer-motion";
|
|
3
3
|
import { memo as N } from "react";
|
|
4
4
|
import { c as r } from "./cn-B6yFEsav.js";
|
|
5
5
|
function c({
|
|
6
|
-
items:
|
|
6
|
+
items: t,
|
|
7
7
|
activeTab: e,
|
|
8
8
|
onTabChange: i,
|
|
9
9
|
className: l,
|
|
10
|
-
tabClassName:
|
|
10
|
+
tabClassName: d,
|
|
11
11
|
activeTabClassName: u,
|
|
12
12
|
indicatorClassName: f,
|
|
13
13
|
animated: b = !0,
|
|
14
14
|
renderTab: o
|
|
15
15
|
}) {
|
|
16
|
-
const
|
|
17
|
-
|
|
16
|
+
const h = (a) => {
|
|
17
|
+
a.disabled || i?.(a.id, a);
|
|
18
18
|
};
|
|
19
19
|
return /* @__PURE__ */ n.jsx(
|
|
20
20
|
"div",
|
|
@@ -24,28 +24,28 @@ function c({
|
|
|
24
24
|
l
|
|
25
25
|
),
|
|
26
26
|
role: "tablist",
|
|
27
|
-
children:
|
|
28
|
-
const
|
|
29
|
-
return o ? /* @__PURE__ */ n.jsx("div", { children: o(
|
|
27
|
+
children: t?.map((a) => {
|
|
28
|
+
const s = e === a.id, m = () => h(a);
|
|
29
|
+
return o ? /* @__PURE__ */ n.jsx("div", { children: o(a, s, m) }, a.id) : /* @__PURE__ */ n.jsxs(
|
|
30
30
|
"button",
|
|
31
31
|
{
|
|
32
32
|
onClick: m,
|
|
33
|
-
disabled:
|
|
33
|
+
disabled: a.disabled,
|
|
34
34
|
className: r(
|
|
35
35
|
"relative flex justify-center items-center h-10 px-4 font-medium focus:outline-none transition-colors",
|
|
36
|
-
!
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
!a.disabled && "hover:text-primary-default-default cursor-pointer",
|
|
37
|
+
a.disabled && "opacity-50 cursor-not-allowed",
|
|
38
|
+
d,
|
|
39
|
+
s && u
|
|
40
40
|
),
|
|
41
|
-
tabIndex:
|
|
42
|
-
"aria-label":
|
|
41
|
+
tabIndex: a.disabled ? -1 : 0,
|
|
42
|
+
"aria-label": a.title,
|
|
43
43
|
role: "tab",
|
|
44
|
-
"aria-selected":
|
|
45
|
-
title:
|
|
44
|
+
"aria-selected": s,
|
|
45
|
+
title: a.description,
|
|
46
46
|
children: [
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
s && b && /* @__PURE__ */ n.jsx(
|
|
48
|
+
x.div,
|
|
49
49
|
{
|
|
50
50
|
layoutId: "tab-indicator",
|
|
51
51
|
className: r(
|
|
@@ -65,30 +65,31 @@ function c({
|
|
|
65
65
|
{
|
|
66
66
|
className: r(
|
|
67
67
|
"relative z-10",
|
|
68
|
-
|
|
68
|
+
s ? "text-primary-default-default font-semibold text-md" : "text-neutral-medium-default font-medium text-md"
|
|
69
69
|
),
|
|
70
|
-
children:
|
|
70
|
+
children: a.title
|
|
71
71
|
}
|
|
72
72
|
)
|
|
73
73
|
]
|
|
74
74
|
},
|
|
75
|
-
|
|
75
|
+
a.id
|
|
76
76
|
);
|
|
77
77
|
})
|
|
78
78
|
}
|
|
79
79
|
);
|
|
80
80
|
}
|
|
81
81
|
c.displayName = "TabLinks";
|
|
82
|
-
const
|
|
83
|
-
if (
|
|
82
|
+
const C = N(c, (t, e) => {
|
|
83
|
+
if (t.activeTab !== e.activeTab || t.className !== e.className || t.tabClassName !== e.tabClassName || t.activeTabClassName !== e.activeTabClassName || t.indicatorClassName !== e.indicatorClassName || t.animated !== e.animated || t.onTabChange !== e.onTabChange || // ✅ AGREGAR ESTO
|
|
84
|
+
t.renderTab !== e.renderTab || t.items.length !== e.items.length)
|
|
84
85
|
return !1;
|
|
85
|
-
for (let i = 0; i <
|
|
86
|
-
const l =
|
|
87
|
-
if (l.id !==
|
|
86
|
+
for (let i = 0; i < t.items.length; i++) {
|
|
87
|
+
const l = t.items[i], d = e.items[i];
|
|
88
|
+
if (l.id !== d.id || l.title !== d.title || l.disabled !== d.disabled || l.description !== d.description)
|
|
88
89
|
return !1;
|
|
89
90
|
}
|
|
90
91
|
return !0;
|
|
91
92
|
});
|
|
92
93
|
export {
|
|
93
|
-
|
|
94
|
+
C as default
|
|
94
95
|
};
|