@situaction/traq-ui-ste 1.1.24 → 1.1.25
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/components/menu/Menu.js +14 -14
- package/package.json +1 -1
|
@@ -26,33 +26,33 @@ const y = "_fullHeight_o2xi7_15", O = "_fullWidth_o2xi7_18", j = "_open_o2xi7_21
|
|
|
26
26
|
flexHorizontalBetween: Z,
|
|
27
27
|
flexVertical: ee,
|
|
28
28
|
flexVerticalBetweenCenter: oe
|
|
29
|
-
}, fe = ({ menuItems: s = [], menuParams:
|
|
30
|
-
const [t, p] = c(N ?? !1), [g, B] = c(
|
|
29
|
+
}, fe = ({ menuItems: s = [], menuParams: r = [], shortLogo: x, logo: m, isOpen: h, defaultOpen: N = !1, selectedId: d }) => {
|
|
30
|
+
const [t, p] = c(N ?? !1), [g, B] = c(d ?? (s.length > 0 ? s[0].id : null)), I = M(null), [V, _] = c(!1), [H, C] = c(!1), [k, E] = c(null), [z, R] = c({}), L = M(null);
|
|
31
31
|
$(() => {
|
|
32
|
-
|
|
33
|
-
}, [
|
|
32
|
+
d != null && B(d);
|
|
33
|
+
}, [d]);
|
|
34
34
|
const v = (o, i) => {
|
|
35
35
|
if (o.stopPropagation(), B(i), s) {
|
|
36
|
-
const n = s.find((
|
|
36
|
+
const n = s.find((a) => a.id === i);
|
|
37
37
|
n == null || n.onClick();
|
|
38
38
|
}
|
|
39
39
|
}, S = () => {
|
|
40
40
|
p(!t), _(!1);
|
|
41
41
|
}, P = (o) => {
|
|
42
42
|
var i;
|
|
43
|
-
if (
|
|
44
|
-
const n =
|
|
43
|
+
if (r) {
|
|
44
|
+
const n = r.find((a) => a.id === o);
|
|
45
45
|
if (!n) return;
|
|
46
46
|
if (n.content) {
|
|
47
|
-
const
|
|
48
|
-
E(n.content), R({ ...n.position, left:
|
|
47
|
+
const a = t ? "200px" : "40px";
|
|
48
|
+
E(n.content), R({ ...n.position, left: a }), C(!0);
|
|
49
49
|
} else
|
|
50
50
|
(i = n.onClick) == null || i.call(n);
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
return $(() => {
|
|
54
54
|
h && h(t);
|
|
55
|
-
}, [t]), /* @__PURE__ */ l("nav", { ref:
|
|
55
|
+
}, [t]), /* @__PURE__ */ l("nav", { ref: I, children: /* @__PURE__ */ f("div", { className: `${e.flexVerticalBetweenStart} ${e.fullHeight} ${t ? e.open : e.close}`, children: [
|
|
56
56
|
/* @__PURE__ */ f("div", { className: e.fullWidth, children: [
|
|
57
57
|
/* @__PURE__ */ l(
|
|
58
58
|
"div",
|
|
@@ -60,7 +60,7 @@ const y = "_fullHeight_o2xi7_15", O = "_fullWidth_o2xi7_18", j = "_open_o2xi7_21
|
|
|
60
60
|
className: `${e.flexHorizontalBetween} ${e.pointer} ${e.textEllipsis}`,
|
|
61
61
|
onClick: () => S(),
|
|
62
62
|
children: t ? /* @__PURE__ */ f("div", { className: e.fullImg, children: [
|
|
63
|
-
|
|
63
|
+
m && /* @__PURE__ */ l("img", { src: m, alt: "Logo situaction" }),
|
|
64
64
|
/* @__PURE__ */ l(u, { mode: "ghost", size: "menu", children: /* @__PURE__ */ l(w, { icon: "CaretDoubleLeft", size: 16, weight: "duotone" }) })
|
|
65
65
|
] }) : /* @__PURE__ */ l(
|
|
66
66
|
"div",
|
|
@@ -69,7 +69,7 @@ const y = "_fullHeight_o2xi7_15", O = "_fullWidth_o2xi7_18", j = "_open_o2xi7_21
|
|
|
69
69
|
onMouseEnter: () => _(!0),
|
|
70
70
|
onMouseLeave: () => _(!1),
|
|
71
71
|
onClick: () => p(!t),
|
|
72
|
-
children:
|
|
72
|
+
children: V || !x ? /* @__PURE__ */ l(u, { mode: "ghost", size: "menu", children: /* @__PURE__ */ l(w, { icon: "CaretDoubleRight", size: 22, weight: "duotone" }) }) : /* @__PURE__ */ l("img", { src: x, alt: "Logo situaction" })
|
|
73
73
|
}
|
|
74
74
|
)
|
|
75
75
|
}
|
|
@@ -93,7 +93,7 @@ const y = "_fullHeight_o2xi7_15", O = "_fullWidth_o2xi7_18", j = "_open_o2xi7_21
|
|
|
93
93
|
/* @__PURE__ */ l("div", { className: e.line })
|
|
94
94
|
] }),
|
|
95
95
|
/* @__PURE__ */ f("div", { className: `${e.menuParams} ${e.flexVerticalBetweenCenter}`, children: [
|
|
96
|
-
|
|
96
|
+
r && r.map((o) => /* @__PURE__ */ l(
|
|
97
97
|
"div",
|
|
98
98
|
{
|
|
99
99
|
className: `${e.fullWidth} ${e.textEllipsis}`,
|
|
@@ -107,7 +107,7 @@ const y = "_fullHeight_o2xi7_15", O = "_fullWidth_o2xi7_18", j = "_open_o2xi7_21
|
|
|
107
107
|
{
|
|
108
108
|
ref: L,
|
|
109
109
|
className: e.borderRadiusM,
|
|
110
|
-
open:
|
|
110
|
+
open: H,
|
|
111
111
|
onClose: () => C(!1),
|
|
112
112
|
position: z,
|
|
113
113
|
children: k
|