prometeo-design-system 4.2.2 → 4.2.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.
- package/dist/TabLinks.es.js +18 -18
- package/package.json +1 -1
package/dist/TabLinks.es.js
CHANGED
|
@@ -3,7 +3,7 @@ import { motion as C } from "framer-motion";
|
|
|
3
3
|
import { memo as N, isValidElement as I } from "react";
|
|
4
4
|
import { c as s } from "./cn-B6yFEsav.js";
|
|
5
5
|
import z from "./PlainTooltip.es.js";
|
|
6
|
-
const
|
|
6
|
+
const w = /* @__PURE__ */ Symbol.for("react.memo"), E = (t, a, r) => {
|
|
7
7
|
if (!t)
|
|
8
8
|
return null;
|
|
9
9
|
if (typeof t == "function") {
|
|
@@ -13,7 +13,7 @@ const E = /* @__PURE__ */ Symbol.for("react.memo"), $ = (t, a, r) => {
|
|
|
13
13
|
if (typeof t == "object") {
|
|
14
14
|
if (I(t))
|
|
15
15
|
return t;
|
|
16
|
-
if ("$$typeof" in t && t.$$typeof ===
|
|
16
|
+
if ("$$typeof" in t && t.$$typeof === w) {
|
|
17
17
|
const l = t;
|
|
18
18
|
return /* @__PURE__ */ i.jsx(l, { size: r, className: a });
|
|
19
19
|
}
|
|
@@ -25,10 +25,10 @@ function p({
|
|
|
25
25
|
activeTab: a,
|
|
26
26
|
onTabChange: r,
|
|
27
27
|
className: l,
|
|
28
|
-
tabClassName:
|
|
28
|
+
tabClassName: n,
|
|
29
29
|
activeTabClassName: h,
|
|
30
|
-
indicatorClassName:
|
|
31
|
-
animated:
|
|
30
|
+
indicatorClassName: y,
|
|
31
|
+
animated: g = !0,
|
|
32
32
|
renderTab: d
|
|
33
33
|
}) {
|
|
34
34
|
const j = (e) => {
|
|
@@ -43,8 +43,8 @@ function p({
|
|
|
43
43
|
),
|
|
44
44
|
role: "tablist",
|
|
45
45
|
children: t?.map((e) => {
|
|
46
|
-
const
|
|
47
|
-
return d ? /* @__PURE__ */ i.jsx("div", { children: d(e,
|
|
46
|
+
const o = a === e.id, u = () => j(e), { iconPosition: f = "top", iconSize: T = 24 } = e, v = (c, m, b, k, x) => b ? /* @__PURE__ */ i.jsx(z, { title: b, ...k, children: /* @__PURE__ */ i.jsx("div", { onMouseEnter: m, onClick: x, children: c }) }) : /* @__PURE__ */ i.jsx("div", { onMouseEnter: m, onClick: x, children: c });
|
|
47
|
+
return d ? /* @__PURE__ */ i.jsx("div", { children: d(e, o, u, e.onIconClick, e.onIconHover, e.iconTooltipTitle, e.iconTooltipProps, e.iconSize) }, e.id) : /* @__PURE__ */ i.jsxs(
|
|
48
48
|
"button",
|
|
49
49
|
{
|
|
50
50
|
onClick: u,
|
|
@@ -54,13 +54,13 @@ function p({
|
|
|
54
54
|
"relative flex flex-col pb-3 justify-center items-center h-max px-4 font-medium focus:outline-none transition-colors",
|
|
55
55
|
!e.disabled && "hover:text-primary-default-default cursor-pointer",
|
|
56
56
|
e.disabled && "opacity-50 cursor-default",
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
n,
|
|
58
|
+
o && h
|
|
59
59
|
),
|
|
60
60
|
tabIndex: e.disabled ? -1 : 0,
|
|
61
61
|
"aria-label": e.title,
|
|
62
62
|
role: "tab",
|
|
63
|
-
"aria-selected":
|
|
63
|
+
"aria-selected": o,
|
|
64
64
|
children: [
|
|
65
65
|
/* @__PURE__ */ i.jsxs("div", { className: s(
|
|
66
66
|
"flex items-center gap-0.5",
|
|
@@ -72,24 +72,24 @@ function p({
|
|
|
72
72
|
{
|
|
73
73
|
className: s(
|
|
74
74
|
"transition-all duration-300 ease-in-out relative z-10 group-hover/tablink-item:text-neutral-medium-hover ",
|
|
75
|
-
|
|
75
|
+
o ? "text-primary-default-default prometeo-fonts-title-medium group-hover/tablink-item:text-primary-default-default" : "text-neutral-medium-default prometeo-fonts-body-large cursor-pointer",
|
|
76
76
|
"leading-6! line-clamp-1"
|
|
77
77
|
),
|
|
78
78
|
children: e.title
|
|
79
79
|
}
|
|
80
80
|
),
|
|
81
|
-
v(
|
|
81
|
+
v(E(e.icon, s(
|
|
82
82
|
"transition-all duration-300 ease-in-out group-hover/tablink-item:text-neutral-medium-hover ",
|
|
83
|
-
|
|
83
|
+
o ? "text-primary-default-default prometeo-fonts-title-medium group-hover/tablink-item:text-primary-default-default" : "text-neutral-medium-default prometeo-fonts-body-large"
|
|
84
84
|
), T), e.onIconHover, e.iconTooltipTitle, e.iconTooltipProps, e.onIconClick)
|
|
85
85
|
] }),
|
|
86
|
-
|
|
86
|
+
o && g && /* @__PURE__ */ i.jsx(
|
|
87
87
|
C.div,
|
|
88
88
|
{
|
|
89
89
|
layoutId: "tab-indicator",
|
|
90
90
|
className: s(
|
|
91
|
-
"absolute -bottom-px left-
|
|
92
|
-
|
|
91
|
+
"absolute -bottom-px left-1/2 -translate-x-1/2 h-[4px] rounded-t-xl bg-primary-default-default z-0 w-[calc(100%-32px)]",
|
|
92
|
+
y
|
|
93
93
|
),
|
|
94
94
|
transition: {
|
|
95
95
|
type: "spring",
|
|
@@ -112,8 +112,8 @@ const H = N(p, (t, a) => {
|
|
|
112
112
|
if (t.activeTab !== a.activeTab || t.className !== a.className || t.tabClassName !== a.tabClassName || t.activeTabClassName !== a.activeTabClassName || t.indicatorClassName !== a.indicatorClassName || t.animated !== a.animated || t.onTabChange !== a.onTabChange || t.renderTab !== a.renderTab || t.items.length !== a.items.length)
|
|
113
113
|
return !1;
|
|
114
114
|
for (let r = 0; r < t.items.length; r++) {
|
|
115
|
-
const l = t.items[r],
|
|
116
|
-
if (l.id !==
|
|
115
|
+
const l = t.items[r], n = a.items[r];
|
|
116
|
+
if (l.id !== n.id || l.title !== n.title || l.disabled !== n.disabled || l.description !== n.description)
|
|
117
117
|
return !1;
|
|
118
118
|
}
|
|
119
119
|
return !0;
|