@bobbykim/mcl-header 0.6.1 → 0.6.2
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/mcl-header.js +147 -150
- package/dist/mcl-header.umd.cjs +1 -1
- package/package.json +3 -3
package/dist/mcl-header.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.nav__decorator[data-v-1b1467b6]:before{content:"";position:absolute;bottom:0;left:0;height:100%;width:0;transition:width .3s linear}.nav__text:focus+.nav__decorator[data-v-1b1467b6]:before,.nav__text:hover+.nav__decorator[data-v-1b1467b6]:before{width:100%}.nav__decorator[data-v-3cd6e9eb]:before{content:"";position:absolute;bottom:0;left:0;height:100%;width:0;transition:width .3s linear}.nav__text:focus+.nav__decorator[data-v-3cd6e9eb]:before,.nav__text:hover+.nav__decorator[data-v-3cd6e9eb]:before{width:100%}.nav__decorator[data-v-94d8fa7b]:before{content:"";position:absolute;bottom:0;left:0;height:100%;width:0;transition:width .3s linear}.nav__text:focus+.nav__decorator[data-v-94d8fa7b]:before,.nav__text:hover+.nav__decorator[data-v-94d8fa7b]:before{width:100%}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
import { defineComponent as
|
|
2
|
+
import { defineComponent as D, ref as z, computed as H, openBlock as i, createElementBlock as d, createElementVNode as n, withDirectives as W, normalizeClass as y, toDisplayString as A, unref as L, createCommentVNode as E, createVNode as j, withCtx as O, Fragment as S, renderList as X, pushScopeId as U, popScopeId as q, withKeys as F, useSlots as J, createBlock as x, renderSlot as _ } from "vue";
|
|
3
3
|
import o, { vCollapse as P, Collapse as Q, DropdownContainer as te, DropdownContent as oe, HeaderHorizontal as ne, HeaderVertical as ie } from "@bobbykim/manguito-theme";
|
|
4
4
|
const ae = (k) => (U("data-v-1b1467b6"), k = k(), q(), k), se = { class: "flex flex-col w-full" }, re = { class: "self-center" }, ue = /* @__PURE__ */ ae(() => /* @__PURE__ */ n("path", { d: "M224 416c-8.188 0-16.38-3.125-22.62-9.375l-192-192c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L224 338.8l169.4-169.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-192 192C240.4 412.9 232.2 416 224 416z" }, null, -1)), de = [
|
|
5
5
|
ue
|
|
6
|
-
], ce = { class: "relative pt-2xs" }, he = { class: "relative flex flex-col" }, fe = ["href", "target", "onClick"], me = /* @__PURE__ */
|
|
6
|
+
], ce = { class: "relative pt-2xs" }, he = { class: "relative flex flex-col" }, fe = ["href", "target", "onClick"], me = /* @__PURE__ */ D({
|
|
7
7
|
__name: "NavCollapse",
|
|
8
8
|
props: {
|
|
9
9
|
navId: {},
|
|
@@ -20,18 +20,18 @@ const ae = (k) => (U("data-v-1b1467b6"), k = k(), q(), k), se = { class: "flex f
|
|
|
20
20
|
},
|
|
21
21
|
emits: ["child-click", "label-click"],
|
|
22
22
|
setup(k, { emit: w }) {
|
|
23
|
-
const
|
|
24
|
-
const { navId: t } =
|
|
23
|
+
const B = k, p = w, g = z(!1), b = H(() => {
|
|
24
|
+
const { navId: t } = B;
|
|
25
25
|
return `nav-${t.toLowerCase().replaceAll(" ", "-")}`;
|
|
26
26
|
}), a = H(() => {
|
|
27
|
-
const { navAccordionGroup: t } =
|
|
27
|
+
const { navAccordionGroup: t } = B;
|
|
28
28
|
return `accordion-${t.toLocaleLowerCase().replaceAll(" ", "-")}`;
|
|
29
29
|
}), h = (t) => {
|
|
30
30
|
g.value = t;
|
|
31
31
|
}, C = (t, s) => {
|
|
32
32
|
p("label-click", t, s, g.value);
|
|
33
|
-
},
|
|
34
|
-
const { asLink: l } =
|
|
33
|
+
}, T = (t, s) => {
|
|
34
|
+
const { asLink: l } = B;
|
|
35
35
|
!l && t.preventDefault(), p("child-click", t, s);
|
|
36
36
|
}, r = (t, s, l) => {
|
|
37
37
|
const f = [
|
|
@@ -43,28 +43,28 @@ const ae = (k) => (U("data-v-1b1467b6"), k = k(), q(), k), se = { class: "flex f
|
|
|
43
43
|
return (t, s) => (i(), d("div", se, [
|
|
44
44
|
n("div", re, [
|
|
45
45
|
W((i(), d("button", {
|
|
46
|
-
class:
|
|
46
|
+
class: y(["tracking-wider align-middle outline-none nav__text flex items-center gap-3xs", r(t.menuTextSize, t.menuTextColor, t.menuTextBold)]),
|
|
47
47
|
onClick: s[0] || (s[0] = (l) => C(l, t.navItem.title))
|
|
48
48
|
}, [
|
|
49
|
-
n("span", null,
|
|
49
|
+
n("span", null, A(t.navItem.title), 1),
|
|
50
50
|
(i(), d("svg", {
|
|
51
51
|
xmlns: "http://www.w3.org/2000/svg",
|
|
52
52
|
viewBox: "0 0 448 512",
|
|
53
|
-
class:
|
|
53
|
+
class: y(["h-[0.8rem] fill-current", [
|
|
54
54
|
g.value ? "rotate-180" : "rotate-0",
|
|
55
55
|
"transition-transform duration-300 ease-in"
|
|
56
56
|
]])
|
|
57
57
|
}, de, 2))
|
|
58
58
|
], 2)), [
|
|
59
|
-
[
|
|
59
|
+
[L(P), void 0, b.value]
|
|
60
60
|
]),
|
|
61
61
|
t.displayHighlight ? (i(), d("div", {
|
|
62
62
|
key: 0,
|
|
63
|
-
class:
|
|
63
|
+
class: y(["relative -top-[2px] h-[6px] nav__decorator", L(o)("BEFOREBG", t.highlightColor)])
|
|
64
64
|
}, null, 2)) : E("", !0)
|
|
65
65
|
]),
|
|
66
|
-
j(
|
|
67
|
-
id:
|
|
66
|
+
j(L(Q), {
|
|
67
|
+
id: b.value,
|
|
68
68
|
visible: !1,
|
|
69
69
|
accordion: a.value,
|
|
70
70
|
onOpen: h,
|
|
@@ -74,19 +74,19 @@ const ae = (k) => (U("data-v-1b1467b6"), k = k(), q(), k), se = { class: "flex f
|
|
|
74
74
|
n("div", ce, [
|
|
75
75
|
t.displayHighlight ? (i(), d("div", {
|
|
76
76
|
key: 0,
|
|
77
|
-
class:
|
|
77
|
+
class: y(["absolute w-md bg-opacity-25 -left-4 h-full", L(o)("BGCOLOR", t.highlightColor)])
|
|
78
78
|
}, null, 2)) : E("", !0),
|
|
79
79
|
n("div", he, [
|
|
80
|
-
(i(!0), d(
|
|
80
|
+
(i(!0), d(S, null, X(t.navItem.children, (l, f) => (i(), d("a", {
|
|
81
81
|
href: l.url,
|
|
82
82
|
target: l.target,
|
|
83
|
-
class:
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
class: y(["w-full pb-2xs last:pb-0", [
|
|
84
|
+
L(o)("TEXTCOLOR", t.menuTextColor),
|
|
85
|
+
L(o)("BODYTEXT", t.menuTextSize)
|
|
86
86
|
]]),
|
|
87
87
|
key: f,
|
|
88
|
-
onClick: (v) =>
|
|
89
|
-
},
|
|
88
|
+
onClick: (v) => T(v, l)
|
|
89
|
+
}, A(l.title), 11, fe))), 128))
|
|
90
90
|
])
|
|
91
91
|
])
|
|
92
92
|
]),
|
|
@@ -94,15 +94,14 @@ const ae = (k) => (U("data-v-1b1467b6"), k = k(), q(), k), se = { class: "flex f
|
|
|
94
94
|
}, 8, ["id", "accordion"])
|
|
95
95
|
]));
|
|
96
96
|
}
|
|
97
|
-
})
|
|
98
|
-
const
|
|
99
|
-
const L = k.__vccOpts || k;
|
|
97
|
+
}), G = (k, w) => {
|
|
98
|
+
const B = k.__vccOpts || k;
|
|
100
99
|
for (const [p, g] of w)
|
|
101
|
-
|
|
102
|
-
return
|
|
100
|
+
B[p] = g;
|
|
101
|
+
return B;
|
|
103
102
|
}, ge = /* @__PURE__ */ G(me, [["__scopeId", "data-v-1b1467b6"]]), pe = (k) => (U("data-v-3cd6e9eb"), k = k(), q(), k), ke = ["onClick"], Ce = /* @__PURE__ */ pe(() => /* @__PURE__ */ n("path", { d: "M224 416c-8.188 0-16.38-3.125-22.62-9.375l-192-192c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L224 338.8l169.4-169.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-192 192C240.4 412.9 232.2 416 224 416z" }, null, -1)), ve = [
|
|
104
103
|
Ce
|
|
105
|
-
], be = ["href", "target", "onClick"], Te = /* @__PURE__ */
|
|
104
|
+
], be = ["href", "target", "onClick"], Te = /* @__PURE__ */ D({
|
|
106
105
|
__name: "NavDropdown",
|
|
107
106
|
props: {
|
|
108
107
|
navItem: {},
|
|
@@ -116,19 +115,19 @@ const G = (k, w) => {
|
|
|
116
115
|
},
|
|
117
116
|
emits: ["label-click", "child-click"],
|
|
118
117
|
setup(k, { emit: w }) {
|
|
119
|
-
const
|
|
118
|
+
const B = k, p = w, g = z(-1), b = z(), a = (r, t, s) => {
|
|
120
119
|
const l = [
|
|
121
120
|
o("BODYTEXT", r),
|
|
122
121
|
o("TEXTCOLOR", t)
|
|
123
122
|
];
|
|
124
123
|
return s && l.push("font-bold"), l.join(" ");
|
|
125
124
|
}, h = (r) => {
|
|
126
|
-
const t =
|
|
127
|
-
|
|
125
|
+
const t = B.navItem.children.length;
|
|
126
|
+
b.value !== void 0 && (r === "down" && g.value < t - 1 && g.value++, r === "up" && g.value > 0 && g.value--, b.value[g.value].focus());
|
|
128
127
|
}, C = (r, t, s) => {
|
|
129
128
|
g.value = -1, p("label-click", r, t, s);
|
|
130
|
-
},
|
|
131
|
-
const { asLink: s } =
|
|
129
|
+
}, T = (r, t) => {
|
|
130
|
+
const { asLink: s } = B;
|
|
132
131
|
!s && r.preventDefault(), p("child-click", r, t);
|
|
133
132
|
};
|
|
134
133
|
return (r, t) => (i(), d("div", {
|
|
@@ -137,18 +136,18 @@ const G = (k, w) => {
|
|
|
137
136
|
t[1] || (t[1] = F((s) => h("up"), ["up"]))
|
|
138
137
|
]
|
|
139
138
|
}, [
|
|
140
|
-
j(
|
|
139
|
+
j(L(te), null, {
|
|
141
140
|
toggler: O(({ toggle: s, dropdownState: l }) => [
|
|
142
141
|
n("div", null, [
|
|
143
142
|
n("button", {
|
|
144
|
-
class:
|
|
143
|
+
class: y(["tracking-wider align-middle outline-none nav__text flex items-center gap-3xs", a(r.menuTextSize, r.menuTextColor, r.menuTextBold)]),
|
|
145
144
|
onClick: (f) => (s(f), C(f, r.navItem.title, l))
|
|
146
145
|
}, [
|
|
147
|
-
n("span", null,
|
|
146
|
+
n("span", null, A(r.navItem.title), 1),
|
|
148
147
|
(i(), d("svg", {
|
|
149
148
|
xmlns: "http://www.w3.org/2000/svg",
|
|
150
149
|
viewBox: "0 0 448 512",
|
|
151
|
-
class:
|
|
150
|
+
class: y(["h-[0.8rem] fill-current", [
|
|
152
151
|
l ? "rotate-180" : "rotate-0",
|
|
153
152
|
"transition-transform duration-300 ease-in"
|
|
154
153
|
]])
|
|
@@ -156,29 +155,29 @@ const G = (k, w) => {
|
|
|
156
155
|
], 10, ke),
|
|
157
156
|
r.displayHighlight ? (i(), d("div", {
|
|
158
157
|
key: 0,
|
|
159
|
-
class:
|
|
158
|
+
class: y(["relative -top-[2px] h-[6px] nav__decorator", L(o)("BEFOREBG", r.highlightColor)])
|
|
160
159
|
}, null, 2)) : E("", !0)
|
|
161
160
|
])
|
|
162
161
|
]),
|
|
163
162
|
default: O(() => [
|
|
164
|
-
j(
|
|
163
|
+
j(L(oe), { className: "border drop-shadow-sm" }, {
|
|
165
164
|
default: O(({ itemClick: s }) => [
|
|
166
|
-
(i(!0), d(
|
|
165
|
+
(i(!0), d(S, null, X(r.navItem.children, (l, f) => (i(), d("a", {
|
|
167
166
|
href: l.url,
|
|
168
167
|
target: l.target,
|
|
169
168
|
key: f,
|
|
170
169
|
ref_for: !0,
|
|
171
170
|
ref_key: "navItemRef",
|
|
172
|
-
ref:
|
|
173
|
-
class:
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
171
|
+
ref: b,
|
|
172
|
+
class: y(["px-xs py-2xs block w-full hover:bg-opacity-50 focus:bg-opacity-50 transition-all duration-200 ease-linear", [
|
|
173
|
+
L(o)("BGCOLOR", r.bgColor),
|
|
174
|
+
L(o)("HVBGCOLOR", r.highlightColor),
|
|
175
|
+
L(o)("FCBGCOLOR", r.highlightColor),
|
|
176
|
+
L(o)("TEXTCOLOR", r.menuTextColor),
|
|
177
|
+
L(o)("BODYTEXT", r.menuTextSize)
|
|
179
178
|
]]),
|
|
180
|
-
onClick: (v) => (s(),
|
|
181
|
-
},
|
|
179
|
+
onClick: (v) => (s(), T(v, l))
|
|
180
|
+
}, A(l.title), 11, be))), 128))
|
|
182
181
|
]),
|
|
183
182
|
_: 1
|
|
184
183
|
})
|
|
@@ -187,8 +186,7 @@ const G = (k, w) => {
|
|
|
187
186
|
})
|
|
188
187
|
], 32));
|
|
189
188
|
}
|
|
190
|
-
})
|
|
191
|
-
const ye = /* @__PURE__ */ G(Te, [["__scopeId", "data-v-3cd6e9eb"]]), Be = ["href", "target", "innerHTML"], Le = /* @__PURE__ */ X({
|
|
189
|
+
}), ye = /* @__PURE__ */ G(Te, [["__scopeId", "data-v-3cd6e9eb"]]), Be = ["href", "target", "innerHTML"], Le = /* @__PURE__ */ D({
|
|
192
190
|
__name: "NavLink",
|
|
193
191
|
props: {
|
|
194
192
|
navItem: {},
|
|
@@ -201,14 +199,14 @@ const ye = /* @__PURE__ */ G(Te, [["__scopeId", "data-v-3cd6e9eb"]]), Be = ["hre
|
|
|
201
199
|
},
|
|
202
200
|
emits: ["nav-link"],
|
|
203
201
|
setup(k, { emit: w }) {
|
|
204
|
-
const
|
|
205
|
-
const
|
|
202
|
+
const B = k, p = w, g = (a, h, C) => {
|
|
203
|
+
const T = [
|
|
206
204
|
o("BODYTEXT", a),
|
|
207
205
|
o("TEXTCOLOR", h)
|
|
208
206
|
];
|
|
209
|
-
return C &&
|
|
210
|
-
},
|
|
211
|
-
const { asLink: C } =
|
|
207
|
+
return C && T.push("font-bold"), T.join(" ");
|
|
208
|
+
}, b = (a, h) => {
|
|
209
|
+
const { asLink: C } = B;
|
|
212
210
|
!C && a.preventDefault(), p("nav-link", a, h);
|
|
213
211
|
};
|
|
214
212
|
return (a, h) => (i(), d("div", null, [
|
|
@@ -216,20 +214,19 @@ const ye = /* @__PURE__ */ G(Te, [["__scopeId", "data-v-3cd6e9eb"]]), Be = ["hre
|
|
|
216
214
|
href: a.navItem.url,
|
|
217
215
|
target: a.navItem.target,
|
|
218
216
|
innerHTML: a.navItem.title,
|
|
219
|
-
class:
|
|
220
|
-
onClick: h[0] || (h[0] = (C) =>
|
|
217
|
+
class: y(["tracking-wider outline-none nav__text", g(a.menuTextSize, a.menuTextColor, a.menuTextBold)]),
|
|
218
|
+
onClick: h[0] || (h[0] = (C) => b(C, a.navItem))
|
|
221
219
|
}, null, 10, Be),
|
|
222
220
|
a.displayHighlight ? (i(), d("div", {
|
|
223
221
|
key: 0,
|
|
224
|
-
class:
|
|
222
|
+
class: y(["relative -top-[2px] h-[6px] nav__decorator", L(o)("BEFOREBG", a.highlightColor)])
|
|
225
223
|
}, null, 2)) : E("", !0)
|
|
226
224
|
]));
|
|
227
225
|
}
|
|
228
|
-
})
|
|
229
|
-
const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { class: "flex flex-shrink-0 items-center self-center" }, Oe = { class: "h-md md:h-lg lg:h-xl mr-2xs md:mr-sm align-middle" }, Ie = ["href", "target"], xe = ["src", "alt"], $e = ["src", "alt"], He = { class: "flex flex-col justify-center ml-2" }, Ee = ["href", "target"], _e = ["innerHTML"], ze = { class: "hidden lg:flex flex-wrap" }, Re = {
|
|
226
|
+
}), V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { class: "flex flex-shrink-0 items-center self-center" }, Oe = { class: "h-md md:h-lg lg:h-xl mr-2xs md:mr-sm align-middle" }, Ie = ["href", "target"], xe = ["src", "alt"], $e = ["src", "alt"], He = { class: "flex flex-col justify-center ml-2" }, Ee = ["href", "target"], ze = ["innerHTML"], Re = { class: "hidden lg:flex flex-wrap" }, Ae = {
|
|
230
227
|
key: 0,
|
|
231
228
|
class: "hidden lg:block"
|
|
232
|
-
},
|
|
229
|
+
}, Se = { class: "flex flex-col items-center justify-center p-xs" }, Xe = { key: 0 }, sl = /* @__PURE__ */ D({
|
|
233
230
|
__name: "MclHeaderA",
|
|
234
231
|
props: {
|
|
235
232
|
logo: {},
|
|
@@ -256,14 +253,14 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
256
253
|
scrollDistance: { default: 50 }
|
|
257
254
|
},
|
|
258
255
|
emits: ["toggle-drawer", "title-click", "menu-click", "collapse-click"],
|
|
259
|
-
setup(k, { expose: w, emit:
|
|
260
|
-
const p = k, g = z(),
|
|
256
|
+
setup(k, { expose: w, emit: B }) {
|
|
257
|
+
const p = k, g = z(), b = J(), a = B, h = () => {
|
|
261
258
|
var l;
|
|
262
259
|
(l = g.value) == null || l.headerClose();
|
|
263
260
|
}, C = (l) => {
|
|
264
261
|
const { titleBlockAsLink: f, titleBlockLink: v, titleBlockLinkTarget: e } = p;
|
|
265
262
|
f || l.preventDefault(), a("title-click", l, v, e), h();
|
|
266
|
-
},
|
|
263
|
+
}, T = (l, f) => {
|
|
267
264
|
const { menuItemAsLink: v } = p;
|
|
268
265
|
v || l.preventDefault(), a("menu-click", l, f), h();
|
|
269
266
|
}, r = (l, f, v) => {
|
|
@@ -277,7 +274,7 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
277
274
|
};
|
|
278
275
|
return w({
|
|
279
276
|
headerClose: h
|
|
280
|
-
}), (l, f) => (i(), x(
|
|
277
|
+
}), (l, f) => (i(), x(L(ne), {
|
|
281
278
|
ref_key: "componentRef",
|
|
282
279
|
ref: g,
|
|
283
280
|
"bg-color": l.bgColor,
|
|
@@ -297,7 +294,7 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
297
294
|
n("img", {
|
|
298
295
|
src: l.logo,
|
|
299
296
|
alt: l.logoAlt,
|
|
300
|
-
class:
|
|
297
|
+
class: y(["h-full", [l.logoSmall ? "hidden lg:inline-block" : "inline-block"]])
|
|
301
298
|
}, null, 10, xe),
|
|
302
299
|
l.logoSmall ? (i(), d("img", {
|
|
303
300
|
key: 0,
|
|
@@ -314,12 +311,12 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
314
311
|
onClick: C
|
|
315
312
|
}, [
|
|
316
313
|
n("h2", {
|
|
317
|
-
class:
|
|
314
|
+
class: y(["inline-block align-middle tracking-wider", t(l.titleSize, l.titleColor)]),
|
|
318
315
|
innerHTML: l.title
|
|
319
|
-
}, null, 10,
|
|
316
|
+
}, null, 10, ze)
|
|
320
317
|
], 8, Ee),
|
|
321
|
-
n("ul",
|
|
322
|
-
(i(!0), d(
|
|
318
|
+
n("ul", Re, [
|
|
319
|
+
(i(!0), d(S, null, X(l.menuItems, (v, e) => (i(), d("li", {
|
|
323
320
|
class: "mr-xs last:mr-0",
|
|
324
321
|
key: `menu-${e}`
|
|
325
322
|
}, [
|
|
@@ -333,7 +330,7 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
333
330
|
"highlight-color": l.highlightColor,
|
|
334
331
|
"bg-color": l.bgColor,
|
|
335
332
|
"as-link": l.menuItemAsLink,
|
|
336
|
-
onChildClick:
|
|
333
|
+
onChildClick: T,
|
|
337
334
|
onLabelClick: r
|
|
338
335
|
}, null, 8, ["nav-item", "menu-text-color", "menu-text-size", "menu-text-bold", "display-highlight", "highlight-color", "bg-color", "as-link"])) : (i(), x(V, {
|
|
339
336
|
key: 0,
|
|
@@ -344,7 +341,7 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
344
341
|
"display-highlight": l.displayHighlight,
|
|
345
342
|
"highlight-color": l.highlightColor,
|
|
346
343
|
"as-link": l.menuItemAsLink,
|
|
347
|
-
onNavLink:
|
|
344
|
+
onNavLink: T
|
|
348
345
|
}, null, 8, ["nav-item", "menu-text-color", "menu-text-size", "menu-text-bold", "display-highlight", "highlight-color", "as-link"]))
|
|
349
346
|
]))), 128))
|
|
350
347
|
])
|
|
@@ -352,14 +349,14 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
352
349
|
])
|
|
353
350
|
]),
|
|
354
351
|
"content-right": O(() => [
|
|
355
|
-
b
|
|
356
|
-
|
|
352
|
+
b["content-right"] ? (i(), d("div", Ae, [
|
|
353
|
+
_(l.$slots, "content-right")
|
|
357
354
|
])) : E("", !0)
|
|
358
355
|
]),
|
|
359
356
|
"mobile-content": O(() => [
|
|
360
357
|
n("div", null, [
|
|
361
|
-
n("ul",
|
|
362
|
-
(i(!0), d(
|
|
358
|
+
n("ul", Se, [
|
|
359
|
+
(i(!0), d(S, null, X(l.menuItems, (v, e) => (i(), d("li", {
|
|
363
360
|
class: "mb-2xs last:mb-0",
|
|
364
361
|
key: `mobile-${e}`
|
|
365
362
|
}, [
|
|
@@ -374,7 +371,7 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
374
371
|
"highlight-color": l.highlightColor,
|
|
375
372
|
"nav-accordion-group": l.title,
|
|
376
373
|
"as-link": l.menuItemAsLink,
|
|
377
|
-
onChildClick:
|
|
374
|
+
onChildClick: T,
|
|
378
375
|
onLabelClick: r
|
|
379
376
|
}, null, 8, ["nav-id", "nav-item", "menu-text-color", "menu-text-size", "menu-text-bold", "display-highlight", "highlight-color", "nav-accordion-group", "as-link"])) : (i(), x(V, {
|
|
380
377
|
key: 0,
|
|
@@ -385,21 +382,21 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
385
382
|
"display-highlight": l.displayHighlight,
|
|
386
383
|
"highlight-color": l.highlightColor,
|
|
387
384
|
"as-link": l.menuItemAsLink,
|
|
388
|
-
onNavLink:
|
|
385
|
+
onNavLink: T
|
|
389
386
|
}, null, 8, ["nav-item", "menu-text-color", "menu-text-size", "menu-text-bold", "display-highlight", "highlight-color", "as-link"]))
|
|
390
387
|
]))), 128))
|
|
391
388
|
]),
|
|
392
|
-
b
|
|
393
|
-
|
|
389
|
+
b["mobile-bottom"] ? (i(), d("div", Xe, [
|
|
390
|
+
_(l.$slots, "mobile-bottom", { headerClose: h })
|
|
394
391
|
])) : E("", !0)
|
|
395
392
|
])
|
|
396
393
|
]),
|
|
397
394
|
_: 3
|
|
398
395
|
}, 8, ["bg-color", "drawer-btn-border", "drawer-btn-color", "fade-in-on-scroll", "mobile-menu-bg-color"]));
|
|
399
396
|
}
|
|
400
|
-
}),
|
|
401
|
-
|
|
402
|
-
],
|
|
397
|
+
}), De = { class: "relative flex gap-2 items-center justify-center" }, Me = /* @__PURE__ */ n("path", { d: "M224 416c-8.188 0-16.38-3.125-22.62-9.375l-192-192c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L224 338.8l169.4-169.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-192 192C240.4 412.9 232.2 416 224 416z" }, null, -1), Ne = [
|
|
398
|
+
Me
|
|
399
|
+
], _e = ["href", "target", "onClick"], je = { class: "relative" }, K = /* @__PURE__ */ D({
|
|
403
400
|
__name: "NavCollapseVertical",
|
|
404
401
|
props: {
|
|
405
402
|
navId: {},
|
|
@@ -414,18 +411,18 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
414
411
|
asLink: { type: Boolean, default: !0 }
|
|
415
412
|
},
|
|
416
413
|
emits: ["label-click", "child-click"],
|
|
417
|
-
setup(k, { expose: w, emit:
|
|
418
|
-
const p = k, g = z(!1),
|
|
414
|
+
setup(k, { expose: w, emit: B }) {
|
|
415
|
+
const p = k, g = z(!1), b = z(), a = B, h = (e) => {
|
|
419
416
|
g.value = e;
|
|
420
417
|
}, C = () => {
|
|
421
418
|
var e;
|
|
422
|
-
(e =
|
|
423
|
-
},
|
|
419
|
+
(e = b.value) == null || e.close();
|
|
420
|
+
}, T = (e, c) => {
|
|
424
421
|
a("label-click", e, c, g.value);
|
|
425
422
|
}, r = (e, c) => {
|
|
426
423
|
var m;
|
|
427
424
|
const { asLink: u } = p;
|
|
428
|
-
u || e.preventDefault(), a("child-click", e, c), (m =
|
|
425
|
+
u || e.preventDefault(), a("child-click", e, c), (m = b.value) == null || m.close(), C();
|
|
429
426
|
}, t = H(() => {
|
|
430
427
|
const { navId: e, navLocation: c } = p, m = e.toLowerCase().replaceAll(" ", "-");
|
|
431
428
|
return `nav-${c}-${m}`;
|
|
@@ -435,22 +432,22 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
435
432
|
}), l = H(() => {
|
|
436
433
|
const { textColor: e, textSize: c, dHl: u, hlColor: m, fontBold: $ } = p, I = [o("BODYTEXT", c)];
|
|
437
434
|
if (!u) {
|
|
438
|
-
const
|
|
435
|
+
const M = [
|
|
439
436
|
o("TEXTCOLOR", e),
|
|
440
437
|
o("HVTEXTCOLOR", m),
|
|
441
438
|
o("FCTEXTCOLOR", m)
|
|
442
439
|
];
|
|
443
|
-
I.push(
|
|
440
|
+
I.push(M.join(" "));
|
|
444
441
|
}
|
|
445
442
|
if (u) {
|
|
446
|
-
const
|
|
447
|
-
I.push(
|
|
448
|
-
const
|
|
443
|
+
const M = o("BEFOREBG", m);
|
|
444
|
+
I.push("before:inset-y-0 before:left-0 before:transition-[width] before:duration-300 before:ease-linear before:w-0 hover:before:w-full focus:before:w-full " + M);
|
|
445
|
+
const N = [
|
|
449
446
|
o("TEXTCOLOR", m),
|
|
450
447
|
o("HVTEXTCOLOR", e),
|
|
451
448
|
o("FCTEXTCOLOR", e)
|
|
452
449
|
];
|
|
453
|
-
I.push(
|
|
450
|
+
I.push(N.join(" "));
|
|
454
451
|
}
|
|
455
452
|
return $ && I.push("font-bold"), I.join(" ");
|
|
456
453
|
}), f = H(() => {
|
|
@@ -461,55 +458,55 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
461
458
|
return m.push($ + I + o("BEFOREBG", c)), m.join(" ");
|
|
462
459
|
}), v = H(() => {
|
|
463
460
|
const { textColor: e, textSize: c, dHl: u, hlColor: m, fontBold: $, navLocation: I } = p;
|
|
464
|
-
let
|
|
465
|
-
const
|
|
461
|
+
let M = c === "xl" ? "lg" : c === "lg" ? "md" : c === "md" ? "sm" : "xs";
|
|
462
|
+
const R = [
|
|
466
463
|
o("TEXTCOLOR", e),
|
|
467
|
-
o("BODYTEXT",
|
|
464
|
+
o("BODYTEXT", M)
|
|
468
465
|
];
|
|
469
|
-
if (I === "mobile" &&
|
|
470
|
-
const
|
|
466
|
+
if (I === "mobile" && R.push("text-end"), !u) {
|
|
467
|
+
const N = [
|
|
471
468
|
o("TEXTCOLOR", e),
|
|
472
469
|
o("HVTEXTCOLOR", m),
|
|
473
470
|
o("FCTEXTCOLOR", m)
|
|
474
471
|
];
|
|
475
|
-
|
|
472
|
+
R.push(N.join(" "));
|
|
476
473
|
}
|
|
477
474
|
if (u) {
|
|
478
|
-
const
|
|
479
|
-
|
|
475
|
+
const N = o("BEFOREBG", m), Z = "before:inset-y-0 before:duration-300 before:ease-linear before:w-0 hover:before:w-full focus:before:w-full before:bg-opacity-70 ", ee = I === "desktop" ? "before:left-0 before:transition-[width] " : "before:left-full hover:before:left-0 focus:before:left-0 before:transition-[all] ";
|
|
476
|
+
R.push(Z + ee + N);
|
|
480
477
|
const le = [
|
|
481
478
|
o("TEXTCOLOR", m),
|
|
482
479
|
o("HVTEXTCOLOR", e),
|
|
483
480
|
o("FCTEXTCOLOR", e)
|
|
484
481
|
];
|
|
485
|
-
|
|
482
|
+
R.push(le.join(" "));
|
|
486
483
|
}
|
|
487
|
-
return $ &&
|
|
484
|
+
return $ && R.push("font-bold"), R.join(" ");
|
|
488
485
|
});
|
|
489
486
|
return w({
|
|
490
487
|
closeCollapse: C
|
|
491
488
|
}), (e, c) => (i(), d("div", null, [
|
|
492
489
|
W((i(), d("button", {
|
|
493
|
-
class:
|
|
494
|
-
onClick: c[0] || (c[0] = (u) =>
|
|
490
|
+
class: y(["px-xs py-2xs relative text-center block w-full before:absolute transition-colors duration-300 ease-linear", [l.value]]),
|
|
491
|
+
onClick: c[0] || (c[0] = (u) => T(u, e.menuItem.title))
|
|
495
492
|
}, [
|
|
496
|
-
n("div",
|
|
497
|
-
n("span", null,
|
|
493
|
+
n("div", De, [
|
|
494
|
+
n("span", null, A(e.menuItem.title), 1),
|
|
498
495
|
(i(), d("svg", {
|
|
499
496
|
xmlns: "http://www.w3.org/2000/svg",
|
|
500
497
|
viewBox: "0 0 448 512",
|
|
501
|
-
class:
|
|
498
|
+
class: y(["h-[0.8rem] fill-current", [
|
|
502
499
|
g.value ? "rotate-180" : "rotate-0",
|
|
503
500
|
"transition-transform duration-300 ease-in"
|
|
504
501
|
]])
|
|
505
|
-
},
|
|
502
|
+
}, Ne, 2))
|
|
506
503
|
])
|
|
507
504
|
], 2)), [
|
|
508
|
-
[
|
|
505
|
+
[L(P), void 0, t.value]
|
|
509
506
|
]),
|
|
510
|
-
j(
|
|
507
|
+
j(L(Q), {
|
|
511
508
|
ref_key: "collapseRef",
|
|
512
|
-
ref:
|
|
509
|
+
ref: b,
|
|
513
510
|
id: t.value,
|
|
514
511
|
accordion: s.value,
|
|
515
512
|
onOpen: h,
|
|
@@ -517,20 +514,20 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
517
514
|
}, {
|
|
518
515
|
default: O(() => [
|
|
519
516
|
n("ul", {
|
|
520
|
-
class:
|
|
517
|
+
class: y(["relative", [f.value]])
|
|
521
518
|
}, [
|
|
522
|
-
(i(!0), d(
|
|
519
|
+
(i(!0), d(S, null, X(e.menuItem.children, (u, m) => (i(), d("li", {
|
|
523
520
|
key: m,
|
|
524
|
-
class:
|
|
521
|
+
class: y([e.navLocation === "desktop" ? "ml-xs" : "mr-xs"])
|
|
525
522
|
}, [
|
|
526
523
|
n("a", {
|
|
527
524
|
href: u.url,
|
|
528
525
|
target: u.target,
|
|
529
526
|
onClick: ($) => r($, u),
|
|
530
|
-
class:
|
|
527
|
+
class: y(["relative before:absolute w-full px-2xs py-3xs block overflow-x-hidden transition-colors duration-300 ease-linear", [v.value]])
|
|
531
528
|
}, [
|
|
532
|
-
n("span", je,
|
|
533
|
-
], 10,
|
|
529
|
+
n("span", je, A(u.title), 1)
|
|
530
|
+
], 10, _e)
|
|
534
531
|
], 2))), 128))
|
|
535
532
|
], 2)
|
|
536
533
|
]),
|
|
@@ -538,7 +535,7 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
538
535
|
}, 8, ["id", "accordion"])
|
|
539
536
|
]));
|
|
540
537
|
}
|
|
541
|
-
}), Ge = ["href", "target"], Fe = { class: "relative" }, Y = /* @__PURE__ */
|
|
538
|
+
}), Ge = ["href", "target"], Fe = { class: "relative" }, Y = /* @__PURE__ */ D({
|
|
542
539
|
__name: "NavLinkVertical",
|
|
543
540
|
props: {
|
|
544
541
|
menuItem: {},
|
|
@@ -551,24 +548,24 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
551
548
|
},
|
|
552
549
|
emits: ["menu-click"],
|
|
553
550
|
setup(k, { emit: w }) {
|
|
554
|
-
const
|
|
555
|
-
const { asLink: C } =
|
|
551
|
+
const B = k, p = w, g = (a, h) => {
|
|
552
|
+
const { asLink: C } = B;
|
|
556
553
|
C || a.preventDefault(), p("menu-click", a, h);
|
|
557
|
-
},
|
|
558
|
-
const { textColor: a, textSize: h, dHl: C, hlColor:
|
|
554
|
+
}, b = H(() => {
|
|
555
|
+
const { textColor: a, textSize: h, dHl: C, hlColor: T, fontBold: r } = B, t = [o("BODYTEXT", h)];
|
|
559
556
|
if (!C) {
|
|
560
557
|
const s = [
|
|
561
558
|
o("TEXTCOLOR", a),
|
|
562
|
-
o("HVTEXTCOLOR",
|
|
563
|
-
o("FCTEXTCOLOR",
|
|
559
|
+
o("HVTEXTCOLOR", T),
|
|
560
|
+
o("FCTEXTCOLOR", T)
|
|
564
561
|
];
|
|
565
562
|
t.push(s.join(" "));
|
|
566
563
|
}
|
|
567
564
|
if (C) {
|
|
568
|
-
const s = o("BEFOREBG",
|
|
569
|
-
t.push(
|
|
565
|
+
const s = o("BEFOREBG", T);
|
|
566
|
+
t.push("before:inset-y-0 before:left-0 before:transition-[width] before:duration-300 before:ease-linear before:w-0 hover:before:w-full focus:before:w-full " + s);
|
|
570
567
|
const f = [
|
|
571
|
-
o("TEXTCOLOR",
|
|
568
|
+
o("TEXTCOLOR", T),
|
|
572
569
|
o("HVTEXTCOLOR", a),
|
|
573
570
|
o("FCTEXTCOLOR", a)
|
|
574
571
|
];
|
|
@@ -577,15 +574,15 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
577
574
|
return r && t.push("font-bold"), t.join(" ");
|
|
578
575
|
});
|
|
579
576
|
return (a, h) => (i(), d("a", {
|
|
580
|
-
class:
|
|
577
|
+
class: y([[b.value], "px-xs py-2xs relative text-center block w-full before:absolute transition-colors duration-300 ease-linear"]),
|
|
581
578
|
href: a.menuItem.url,
|
|
582
579
|
target: a.menuItem.target ? a.menuItem.target : "_self",
|
|
583
580
|
onClick: h[0] || (h[0] = (C) => g(C, a.menuItem))
|
|
584
581
|
}, [
|
|
585
|
-
n("span", Fe,
|
|
582
|
+
n("span", Fe, A(a.menuItem.title), 1)
|
|
586
583
|
], 10, Ge));
|
|
587
584
|
}
|
|
588
|
-
}), Ve = { class: "p-md text-center" }, Ke = ["href", "target"], Ye = ["src", "alt"], We = ["href", "target"], Ue = ["innerHTML"], qe = { class: "flex flex-col" }, Je = { key: 0 }, Pe = { class: "flex flex-col justify-between h-full" }, Qe = { class: "p-md text-center" }, Ze = ["href", "target"], el = ["src", "alt"], ll = ["href", "target"], tl = ["innerHTML"], ol = { class: "flex flex-col" }, nl = { key: 0 }, rl = /* @__PURE__ */
|
|
585
|
+
}), Ve = { class: "p-md text-center" }, Ke = ["href", "target"], Ye = ["src", "alt"], We = ["href", "target"], Ue = ["innerHTML"], qe = { class: "flex flex-col" }, Je = { key: 0 }, Pe = { class: "flex flex-col justify-between h-full" }, Qe = { class: "p-md text-center" }, Ze = ["href", "target"], el = ["src", "alt"], ll = ["href", "target"], tl = ["innerHTML"], ol = { class: "flex flex-col" }, nl = { key: 0 }, rl = /* @__PURE__ */ D({
|
|
589
586
|
__name: "MclHeaderB",
|
|
590
587
|
props: {
|
|
591
588
|
logo: {},
|
|
@@ -609,10 +606,10 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
609
606
|
headerWidth: { default: 160 }
|
|
610
607
|
},
|
|
611
608
|
emits: ["toggle-drawer", "title-click", "menu-click", "collapse-click"],
|
|
612
|
-
setup(k, { expose: w, emit:
|
|
613
|
-
const p = k, g = J(),
|
|
614
|
-
|
|
615
|
-
},
|
|
609
|
+
setup(k, { expose: w, emit: B }) {
|
|
610
|
+
const p = k, g = J(), b = B, a = z(), h = z(), C = (e, c) => {
|
|
611
|
+
b("toggle-drawer", e, c);
|
|
612
|
+
}, T = () => {
|
|
616
613
|
var e;
|
|
617
614
|
(e = a.value) == null || e.headerClose();
|
|
618
615
|
}, r = () => {
|
|
@@ -620,12 +617,12 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
620
617
|
h.value[e].closeCollapse();
|
|
621
618
|
}, t = (e) => {
|
|
622
619
|
const { titleBlockAsLink: c, titleBlockLink: u, titleBlockLinkTarget: m } = p;
|
|
623
|
-
c || e.preventDefault(),
|
|
620
|
+
c || e.preventDefault(), b("title-click", e, u, m), T(), r();
|
|
624
621
|
}, s = (e, c) => {
|
|
625
622
|
const { menuItemAsLink: u } = p;
|
|
626
|
-
u || e.preventDefault(),
|
|
623
|
+
u || e.preventDefault(), b("menu-click", e, c), T(), r();
|
|
627
624
|
}, l = (e, c, u) => {
|
|
628
|
-
|
|
625
|
+
b("collapse-click", e, c, u);
|
|
629
626
|
}, f = H(() => {
|
|
630
627
|
const { titleSize: e, titleColor: c } = p;
|
|
631
628
|
return [
|
|
@@ -637,8 +634,8 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
637
634
|
return typeof c.children > "u" ? !1 : c.children.length > 0;
|
|
638
635
|
};
|
|
639
636
|
return w({
|
|
640
|
-
headerClose:
|
|
641
|
-
}), (e, c) => (i(), x(
|
|
637
|
+
headerClose: T
|
|
638
|
+
}), (e, c) => (i(), x(L(ie), {
|
|
642
639
|
"bg-color": e.bgColor,
|
|
643
640
|
"drawer-btn-color": e.drawerBtnColor,
|
|
644
641
|
"drawer-btn-border": e.drawerBtnBorder,
|
|
@@ -648,7 +645,7 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
648
645
|
ref: a
|
|
649
646
|
}, {
|
|
650
647
|
default: O(() => [
|
|
651
|
-
|
|
648
|
+
_(e.$slots, "default")
|
|
652
649
|
]),
|
|
653
650
|
content: O(() => [
|
|
654
651
|
n("div", null, [
|
|
@@ -672,13 +669,13 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
672
669
|
onClick: t
|
|
673
670
|
}, [
|
|
674
671
|
n("h3", {
|
|
675
|
-
class:
|
|
672
|
+
class: y([f.value, "text-center mb-md"]),
|
|
676
673
|
innerHTML: e.title
|
|
677
674
|
}, null, 10, Ue)
|
|
678
675
|
], 8, We)
|
|
679
676
|
]),
|
|
680
677
|
n("ul", qe, [
|
|
681
|
-
(i(!0), d(
|
|
678
|
+
(i(!0), d(S, null, X(e.menuItems, (u, m) => (i(), d("li", {
|
|
682
679
|
key: `menu-${m}`
|
|
683
680
|
}, [
|
|
684
681
|
v(u) ? (i(), x(K, {
|
|
@@ -714,8 +711,8 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
714
711
|
])
|
|
715
712
|
]),
|
|
716
713
|
"content-bottom": O(() => [
|
|
717
|
-
|
|
718
|
-
|
|
714
|
+
g["content-bottom"] ? (i(), d("div", Je, [
|
|
715
|
+
_(e.$slots, "content-bottom")
|
|
719
716
|
])) : E("", !0)
|
|
720
717
|
]),
|
|
721
718
|
"mobile-content": O(({ headerClose: u }) => [
|
|
@@ -741,13 +738,13 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
741
738
|
onClick: t
|
|
742
739
|
}, [
|
|
743
740
|
n("h3", {
|
|
744
|
-
class:
|
|
741
|
+
class: y([f.value, "text-center mb-md"]),
|
|
745
742
|
innerHTML: e.title
|
|
746
743
|
}, null, 10, tl)
|
|
747
744
|
], 8, ll)
|
|
748
745
|
]),
|
|
749
746
|
n("ul", ol, [
|
|
750
|
-
(i(!0), d(
|
|
747
|
+
(i(!0), d(S, null, X(e.menuItems, (m, $) => (i(), d("li", {
|
|
751
748
|
key: `menu-${$}`
|
|
752
749
|
}, [
|
|
753
750
|
v(m) ? (i(), x(K, {
|
|
@@ -778,8 +775,8 @@ const V = /* @__PURE__ */ G(Le, [["__scopeId", "data-v-94d8fa7b"]]), we = { clas
|
|
|
778
775
|
]))), 128))
|
|
779
776
|
])
|
|
780
777
|
]),
|
|
781
|
-
|
|
782
|
-
|
|
778
|
+
g["mobile-bottom"] ? (i(), d("div", nl, [
|
|
779
|
+
_(e.$slots, "mobile-bottom", { headerClose: u })
|
|
783
780
|
])) : E("", !0)
|
|
784
781
|
])
|
|
785
782
|
]),
|
package/dist/mcl-header.umd.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.nav__decorator[data-v-1b1467b6]:before{content:"";position:absolute;bottom:0;left:0;height:100%;width:0;transition:width .3s linear}.nav__text:focus+.nav__decorator[data-v-1b1467b6]:before,.nav__text:hover+.nav__decorator[data-v-1b1467b6]:before{width:100%}.nav__decorator[data-v-3cd6e9eb]:before{content:"";position:absolute;bottom:0;left:0;height:100%;width:0;transition:width .3s linear}.nav__text:focus+.nav__decorator[data-v-3cd6e9eb]:before,.nav__text:hover+.nav__decorator[data-v-3cd6e9eb]:before{width:100%}.nav__decorator[data-v-94d8fa7b]:before{content:"";position:absolute;bottom:0;left:0;height:100%;width:0;transition:width .3s linear}.nav__text:focus+.nav__decorator[data-v-94d8fa7b]:before,.nav__text:hover+.nav__decorator[data-v-94d8fa7b]:before{width:100%}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
(function(L,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@bobbykim/manguito-theme")):typeof define=="function"&&define.amd?define(["exports","vue","@bobbykim/manguito-theme"],e):(L=typeof globalThis<"u"?globalThis:L||self,e(L.MclHeader={},L.Vue,L.ManguitoTheme))})(this,function(L,e,t){"use strict";const $=k=>(e.pushScopeId("data-v-1b1467b6"),k=k(),e.popScopeId(),k),_={class:"flex flex-col w-full"},S={class:"self-center"},H=[$(()=>e.createElementVNode("path",{d:"M224 416c-8.188 0-16.38-3.125-22.62-9.375l-192-192c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L224 338.8l169.4-169.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-192 192C240.4 412.9 232.2 416 224 416z"},null,-1))],R={class:"relative pt-2xs"},A={class:"relative flex flex-col"},D=["href","target","onClick"],X=e.defineComponent({__name:"NavCollapse",props:{navId:{},navAccordionGroup:{},navItem:{},bgColor:{default:"light-2"},hoverBgColor:{default:"dark-1"},menuTextSize:{default:"md"},menuTextColor:{default:"dark-3"},menuTextBold:{type:Boolean,default:!1},displayHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},asLink:{type:Boolean,default:!0}},emits:["child-click","label-click"],setup(k,{emit:T}){const b=k,p=T,f=e.ref(!1),C=e.computed(()=>{const{navId:n}=b;return`nav-${n.toLowerCase().replaceAll(" ","-")}`}),i=e.computed(()=>{const{navAccordionGroup:n}=b;return`accordion-${n.toLocaleLowerCase().replaceAll(" ","-")}`}),d=n=>{f.value=n},u=(n,r)=>{p("label-click",n,r,f.value)},B=(n,r)=>{const{asLink:o}=b;!o&&n.preventDefault(),p("child-click",n,r)},a=(n,r,o)=>{const m=[t("BODYTEXT",n),t("TEXTCOLOR",r)];return o&&m.push("font-bold"),m.join(" ")};return(n,r)=>(e.openBlock(),e.createElementBlock("div",_,[e.createElementVNode("div",S,[e.withDirectives((e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["tracking-wider align-middle outline-none nav__text flex items-center gap-3xs",a(n.menuTextSize,n.menuTextColor,n.menuTextBold)]),onClick:r[0]||(r[0]=o=>u(o,n.navItem.title))},[e.createElementVNode("span",null,e.toDisplayString(n.navItem.title),1),(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",class:e.normalizeClass(["h-[0.8rem] fill-current",[f.value?"rotate-180":"rotate-0","transition-transform duration-300 ease-in"]])},H,2))],2)),[[e.unref(t.vCollapse),void 0,C.value]]),n.displayHighlight?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["relative -top-[2px] h-[6px] nav__decorator",e.unref(t)("BEFOREBG",n.highlightColor)])},null,2)):e.createCommentVNode("",!0)]),e.createVNode(e.unref(t.Collapse),{id:C.value,visible:!1,accordion:i.value,onOpen:d,onClose:d},{default:e.withCtx(()=>[e.createElementVNode("div",R,[n.displayHighlight?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["absolute w-md bg-opacity-25 -left-4 h-full",e.unref(t)("BGCOLOR",n.highlightColor)])},null,2)):e.createCommentVNode("",!0),e.createElementVNode("div",A,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.navItem.children,(o,m)=>(e.openBlock(),e.createElementBlock("a",{href:o.url,target:o.target,class:e.normalizeClass(["w-full pb-2xs last:pb-0",[e.unref(t)("TEXTCOLOR",n.menuTextColor),e.unref(t)("BODYTEXT",n.menuTextSize)]]),key:m,onClick:g=>B(g,o)},e.toDisplayString(o.title),11,D))),128))])])]),_:1},8,["id","accordion"])]))}}),Se="",x=(k,T)=>{const b=k.__vccOpts||k;for(const[p,f]of T)b[p]=f;return b},M=x(X,[["__scopeId","data-v-1b1467b6"]]),j=k=>(e.pushScopeId("data-v-3cd6e9eb"),k=k(),e.popScopeId(),k),F=["onClick"],G=[j(()=>e.createElementVNode("path",{d:"M224 416c-8.188 0-16.38-3.125-22.62-9.375l-192-192c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L224 338.8l169.4-169.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-192 192C240.4 412.9 232.2 416 224 416z"},null,-1))],K=["href","target","onClick"],Y=e.defineComponent({__name:"NavDropdown",props:{navItem:{},bgColor:{default:"light-1"},menuTextSize:{default:"md"},menuTextColor:{default:"dark-3"},menuTextBold:{type:Boolean,default:!1},displayHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},asLink:{type:Boolean,default:!0}},emits:["label-click","child-click"],setup(k,{emit:T}){const b=k,p=T,f=e.ref(-1),C=e.ref(),i=(a,n,r)=>{const o=[t("BODYTEXT",a),t("TEXTCOLOR",n)];return r&&o.push("font-bold"),o.join(" ")},d=a=>{const n=b.navItem.children.length;C.value!==void 0&&(a==="down"&&f.value<n-1&&f.value++,a==="up"&&f.value>0&&f.value--,C.value[f.value].focus())},u=(a,n,r)=>{f.value=-1,p("label-click",a,n,r)},B=(a,n)=>{const{asLink:r}=b;!r&&a.preventDefault(),p("child-click",a,n)};return(a,n)=>(e.openBlock(),e.createElementBlock("div",{onKeyup:[n[0]||(n[0]=e.withKeys(r=>d("down"),["down"])),n[1]||(n[1]=e.withKeys(r=>d("up"),["up"]))]},[e.createVNode(e.unref(t.DropdownContainer),null,{toggler:e.withCtx(({toggle:r,dropdownState:o})=>[e.createElementVNode("div",null,[e.createElementVNode("button",{class:e.normalizeClass(["tracking-wider align-middle outline-none nav__text flex items-center gap-3xs",i(a.menuTextSize,a.menuTextColor,a.menuTextBold)]),onClick:m=>(r(m),u(m,a.navItem.title,o))},[e.createElementVNode("span",null,e.toDisplayString(a.navItem.title),1),(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",class:e.normalizeClass(["h-[0.8rem] fill-current",[o?"rotate-180":"rotate-0","transition-transform duration-300 ease-in"]])},G,2))],10,F),a.displayHighlight?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["relative -top-[2px] h-[6px] nav__decorator",e.unref(t)("BEFOREBG",a.highlightColor)])},null,2)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createVNode(e.unref(t.DropdownContent),{className:"border drop-shadow-sm"},{default:e.withCtx(({itemClick:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.navItem.children,(o,m)=>(e.openBlock(),e.createElementBlock("a",{href:o.url,target:o.target,key:m,ref_for:!0,ref_key:"navItemRef",ref:C,class:e.normalizeClass(["px-xs py-2xs block w-full hover:bg-opacity-50 focus:bg-opacity-50 transition-all duration-200 ease-linear",[e.unref(t)("BGCOLOR",a.bgColor),e.unref(t)("HVBGCOLOR",a.highlightColor),e.unref(t)("FCBGCOLOR",a.highlightColor),e.unref(t)("TEXTCOLOR",a.menuTextColor),e.unref(t)("BODYTEXT",a.menuTextSize)]]),onClick:g=>(r(),B(g,o))},e.toDisplayString(o.title),11,K))),128))]),_:1})]),_:1})],32))}}),Re="",q=x(Y,[["__scopeId","data-v-3cd6e9eb"]]),W=["href","target","innerHTML"],P=e.defineComponent({__name:"NavLink",props:{navItem:{},menuTextSize:{default:"md"},menuTextColor:{default:"dark-3"},menuTextBold:{type:Boolean,default:!1},displayHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},asLink:{type:Boolean,default:!0}},emits:["nav-link"],setup(k,{emit:T}){const b=k,p=T,f=(i,d,u)=>{const B=[t("BODYTEXT",i),t("TEXTCOLOR",d)];return u&&B.push("font-bold"),B.join(" ")},C=(i,d)=>{const{asLink:u}=b;!u&&i.preventDefault(),p("nav-link",i,d)};return(i,d)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("a",{href:i.navItem.url,target:i.navItem.target,innerHTML:i.navItem.title,class:e.normalizeClass(["tracking-wider outline-none nav__text",f(i.menuTextSize,i.menuTextColor,i.menuTextBold)]),onClick:d[0]||(d[0]=u=>C(u,i.navItem))},null,10,W),i.displayHighlight?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["relative -top-[2px] h-[6px] nav__decorator",e.unref(t)("BEFOREBG",i.highlightColor)])},null,2)):e.createCommentVNode("",!0)]))}}),Ae="",I=x(P,[["__scopeId","data-v-94d8fa7b"]]),U={class:"flex flex-shrink-0 items-center self-center"},J={class:"h-md md:h-lg lg:h-xl mr-2xs md:mr-sm align-middle"},Q=["href","target"],Z=["src","alt"],v=["src","alt"],ee={class:"flex flex-col justify-center ml-2"},le=["href","target"],oe=["innerHTML"],te={class:"hidden lg:flex flex-wrap"},ne={key:0,class:"hidden lg:block"},ie={class:"flex flex-col items-center justify-center p-xs"},re={key:0},ae=e.defineComponent({__name:"MclHeaderA",props:{logo:{},logoSmall:{},logoAlt:{default:""},title:{},titleSize:{default:"md"},titleColor:{default:"dark-3"},titleBlockAsLink:{type:Boolean,default:!1},titleBlockLinkTarget:{default:"_self"},titleBlockLink:{},menuItems:{},menuItemAsLink:{type:Boolean,default:!1},menuTextSize:{default:"md"},menuTextColor:{default:"dark-3"},menuTextBold:{type:Boolean,default:!1},displayHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},bgColor:{default:"light-1"},mobileMenuBgColor:{default:"light-2"},drawerBtnColor:{default:"dark-1"},drawerBtnBorder:{type:Boolean,default:!0},fadeInOnScroll:{type:Boolean,default:!0},scrollDistance:{default:50}},emits:["toggle-drawer","title-click","menu-click","collapse-click"],setup(k,{expose:T,emit:b}){const p=k,f=e.ref(),C=e.useSlots(),i=b,d=()=>{var o;(o=f.value)==null||o.headerClose()},u=o=>{const{titleBlockAsLink:m,titleBlockLink:g,titleBlockLinkTarget:l}=p;m||o.preventDefault(),i("title-click",o,g,l),d()},B=(o,m)=>{const{menuItemAsLink:g}=p;g||o.preventDefault(),i("menu-click",o,m),d()},a=(o,m,g)=>{i("collapse-click",o,m,g)},n=(o,m)=>[t("H2",o),t("TEXTCOLOR",m)].join(" "),r=o=>{const m=o;return typeof m.children>"u"?!1:m.children.length>0};return T({headerClose:d}),(o,m)=>(e.openBlock(),e.createBlock(e.unref(t.HeaderHorizontal),{ref_key:"componentRef",ref:f,"bg-color":o.bgColor,"drawer-btn-border":o.drawerBtnBorder,"drawer-btn-color":o.drawerBtnColor,"fade-in-on-scroll":o.fadeInOnScroll,"mobile-menu-bg-color":o.mobileMenuBgColor},{content:e.withCtx(()=>[e.createElementVNode("div",U,[e.createElementVNode("div",J,[e.createElementVNode("a",{href:o.titleBlockLink,target:o.titleBlockLinkTarget,onClick:u},[e.createElementVNode("img",{src:o.logo,alt:o.logoAlt,class:e.normalizeClass(["h-full",[o.logoSmall?"hidden lg:inline-block":"inline-block"]])},null,10,Z),o.logoSmall?(e.openBlock(),e.createElementBlock("img",{key:0,src:o.logoSmall,alt:o.logoAlt,class:"inline-block lg:hidden h-full"},null,8,v)):e.createCommentVNode("",!0)],8,Q)]),e.createElementVNode("div",ee,[e.createElementVNode("a",{href:o.titleBlockLink,target:o.titleBlockLinkTarget,onClick:u},[e.createElementVNode("h2",{class:e.normalizeClass(["inline-block align-middle tracking-wider",n(o.titleSize,o.titleColor)]),innerHTML:o.title},null,10,oe)],8,le),e.createElementVNode("ul",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.menuItems,(g,l)=>(e.openBlock(),e.createElementBlock("li",{class:"mr-xs last:mr-0",key:`menu-${l}`},[r(g)?(e.openBlock(),e.createBlock(q,{key:1,"nav-item":g,"menu-text-color":o.menuTextColor,"menu-text-size":o.menuTextSize,"menu-text-bold":o.menuTextBold,"display-highlight":o.displayHighlight,"highlight-color":o.highlightColor,"bg-color":o.bgColor,"as-link":o.menuItemAsLink,onChildClick:B,onLabelClick:a},null,8,["nav-item","menu-text-color","menu-text-size","menu-text-bold","display-highlight","highlight-color","bg-color","as-link"])):(e.openBlock(),e.createBlock(I,{key:0,"nav-item":g,"menu-text-color":o.menuTextColor,"menu-text-size":o.menuTextSize,"menu-text-bold":o.menuTextBold,"display-highlight":o.displayHighlight,"highlight-color":o.highlightColor,"as-link":o.menuItemAsLink,onNavLink:B},null,8,["nav-item","menu-text-color","menu-text-size","menu-text-bold","display-highlight","highlight-color","as-link"]))]))),128))])])])]),"content-right":e.withCtx(()=>[e.unref(C)["content-right"]?(e.openBlock(),e.createElementBlock("div",ne,[e.renderSlot(o.$slots,"content-right")])):e.createCommentVNode("",!0)]),"mobile-content":e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("ul",ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.menuItems,(g,l)=>(e.openBlock(),e.createElementBlock("li",{class:"mb-2xs last:mb-0",key:`mobile-${l}`},[r(g)?(e.openBlock(),e.createBlock(M,{key:1,"nav-id":g.title,"nav-item":g,"menu-text-color":o.menuTextColor,"menu-text-size":o.menuTextSize,"menu-text-bold":o.menuTextBold,"display-highlight":o.displayHighlight,"highlight-color":o.highlightColor,"nav-accordion-group":o.title,"as-link":o.menuItemAsLink,onChildClick:B,onLabelClick:a},null,8,["nav-id","nav-item","menu-text-color","menu-text-size","menu-text-bold","display-highlight","highlight-color","nav-accordion-group","as-link"])):(e.openBlock(),e.createBlock(I,{key:0,"nav-item":g,"menu-text-color":o.menuTextColor,"menu-text-size":o.menuTextSize,"menu-text-bold":o.menuTextBold,"display-highlight":o.displayHighlight,"highlight-color":o.highlightColor,"as-link":o.menuItemAsLink,onNavLink:B},null,8,["nav-item","menu-text-color","menu-text-size","menu-text-bold","display-highlight","highlight-color","as-link"]))]))),128))]),e.unref(C)["mobile-bottom"]?(e.openBlock(),e.createElementBlock("div",re,[e.renderSlot(o.$slots,"mobile-bottom",{headerClose:d})])):e.createCommentVNode("",!0)])]),_:3},8,["bg-color","drawer-btn-border","drawer-btn-color","fade-in-on-scroll","mobile-menu-bg-color"]))}}),se={class:"relative flex gap-2 items-center justify-center"},ce=[e.createElementVNode("path",{d:"M224 416c-8.188 0-16.38-3.125-22.62-9.375l-192-192c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L224 338.8l169.4-169.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-192 192C240.4 412.9 232.2 416 224 416z"},null,-1)],de=["href","target","onClick"],me={class:"relative"},z=e.defineComponent({__name:"NavCollapseVertical",props:{navId:{},navAccordionGroup:{},navLocation:{},menuItem:{},textColor:{default:"dark-3"},textSize:{default:"md"},fontBold:{type:Boolean,default:!1},dHl:{type:Boolean,default:!0},hlColor:{default:"primary"},asLink:{type:Boolean,default:!0}},emits:["label-click","child-click"],setup(k,{expose:T,emit:b}){const p=k,f=e.ref(!1),C=e.ref(),i=b,d=l=>{f.value=l},u=()=>{var l;(l=C.value)==null||l.close()},B=(l,c)=>{i("label-click",l,c,f.value)},a=(l,c)=>{var h;const{asLink:s}=p;s||l.preventDefault(),i("child-click",l,c),(h=C.value)==null||h.close(),u()},n=e.computed(()=>{const{navId:l,navLocation:c}=p,h=l.toLowerCase().replaceAll(" ","-");return`nav-${c}-${h}`}),r=e.computed(()=>{const{navAccordionGroup:l,navLocation:c}=p,s=l.toLowerCase().replaceAll(" ","-");return`nav-accordion-group-${c}-${s}`}),o=e.computed(()=>{const{textColor:l,textSize:c,dHl:s,hlColor:h,fontBold:E}=p,y=[t("BODYTEXT",c)];if(!s){const O=[t("TEXTCOLOR",l),t("HVTEXTCOLOR",h),t("FCTEXTCOLOR",h)];y.push(O.join(" "))}if(s){const O=t("BEFOREBG",h),w="before:inset-y-0 before:left-0 before:transition-[width] before:duration-300 before:ease-linear before:w-0 hover:before:w-full focus:before:w-full ";y.push(w+O);const N=[t("TEXTCOLOR",h),t("HVTEXTCOLOR",l),t("FCTEXTCOLOR",l)];y.push(N.join(" "))}return E&&y.push("font-bold"),y.join(" ")}),m=e.computed(()=>{const{dHl:l,hlColor:c,navLocation:s}=p,h=[];if(!l)return"";const E="before:absolute before:w-xs before:h-full before:bg-primary before:bg-opacity-70 ",y=s==="desktop"?"before:left-0 ":"before:right-0 ";return h.push(E+y+t("BEFOREBG",c)),h.join(" ")}),g=e.computed(()=>{const{textColor:l,textSize:c,dHl:s,hlColor:h,fontBold:E,navLocation:y}=p;let O=c==="xl"?"lg":c==="lg"?"md":c==="md"?"sm":"xs";const w=[t("TEXTCOLOR",l),t("BODYTEXT",O)];if(y==="mobile"&&w.push("text-end"),!s){const N=[t("TEXTCOLOR",l),t("HVTEXTCOLOR",h),t("FCTEXTCOLOR",h)];w.push(N.join(" "))}if(s){const N=t("BEFOREBG",h),ze="before:inset-y-0 before:duration-300 before:ease-linear before:w-0 hover:before:w-full focus:before:w-full before:bg-opacity-70 ",Ve=y==="desktop"?"before:left-0 before:transition-[width] ":"before:left-full hover:before:left-0 focus:before:left-0 before:transition-[all] ";w.push(ze+Ve+N);const $e=[t("TEXTCOLOR",h),t("HVTEXTCOLOR",l),t("FCTEXTCOLOR",l)];w.push($e.join(" "))}return E&&w.push("font-bold"),w.join(" ")});return T({closeCollapse:u}),(l,c)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives((e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["px-xs py-2xs relative text-center block w-full before:absolute transition-colors duration-300 ease-linear",[o.value]]),onClick:c[0]||(c[0]=s=>B(s,l.menuItem.title))},[e.createElementVNode("div",se,[e.createElementVNode("span",null,e.toDisplayString(l.menuItem.title),1),(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",class:e.normalizeClass(["h-[0.8rem] fill-current",[f.value?"rotate-180":"rotate-0","transition-transform duration-300 ease-in"]])},ce,2))])],2)),[[e.unref(t.vCollapse),void 0,n.value]]),e.createVNode(e.unref(t.Collapse),{ref_key:"collapseRef",ref:C,id:n.value,accordion:r.value,onOpen:d,onClose:d},{default:e.withCtx(()=>[e.createElementVNode("ul",{class:e.normalizeClass(["relative",[m.value]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.menuItem.children,(s,h)=>(e.openBlock(),e.createElementBlock("li",{key:h,class:e.normalizeClass([l.navLocation==="desktop"?"ml-xs":"mr-xs"])},[e.createElementVNode("a",{href:s.url,target:s.target,onClick:E=>a(E,s),class:e.normalizeClass(["relative before:absolute w-full px-2xs py-3xs block overflow-x-hidden transition-colors duration-300 ease-linear",[g.value]])},[e.createElementVNode("span",me,e.toDisplayString(s.title),1)],10,de)],2))),128))],2)]),_:1},8,["id","accordion"])]))}}),he=["href","target"],fe={class:"relative"},V=e.defineComponent({__name:"NavLinkVertical",props:{menuItem:{},textColor:{default:"dark-3"},textSize:{default:"md"},fontBold:{type:Boolean,default:!1},dHl:{type:Boolean,default:!0},hlColor:{default:"primary"},asLink:{type:Boolean,default:!0}},emits:["menu-click"],setup(k,{emit:T}){const b=k,p=T,f=(i,d)=>{const{asLink:u}=b;u||i.preventDefault(),p("menu-click",i,d)},C=e.computed(()=>{const{textColor:i,textSize:d,dHl:u,hlColor:B,fontBold:a}=b,n=[t("BODYTEXT",d)];if(!u){const r=[t("TEXTCOLOR",i),t("HVTEXTCOLOR",B),t("FCTEXTCOLOR",B)];n.push(r.join(" "))}if(u){const r=t("BEFOREBG",B),o="before:inset-y-0 before:left-0 before:transition-[width] before:duration-300 before:ease-linear before:w-0 hover:before:w-full focus:before:w-full ";n.push(o+r);const m=[t("TEXTCOLOR",B),t("HVTEXTCOLOR",i),t("FCTEXTCOLOR",i)];n.push(m.join(" "))}return a&&n.push("font-bold"),n.join(" ")});return(i,d)=>(e.openBlock(),e.createElementBlock("a",{class:e.normalizeClass([[C.value],"px-xs py-2xs relative text-center block w-full before:absolute transition-colors duration-300 ease-linear"]),href:i.menuItem.url,target:i.menuItem.target?i.menuItem.target:"_self",onClick:d[0]||(d[0]=u=>f(u,i.menuItem))},[e.createElementVNode("span",fe,e.toDisplayString(i.menuItem.title),1)],10,he))}}),pe={class:"p-md text-center"},ke=["href","target"],ue=["src","alt"],ge=["href","target"],Ce=["innerHTML"],Be={class:"flex flex-col"},be={key:0},Te={class:"flex flex-col justify-between h-full"},ye={class:"p-md text-center"},Le=["href","target"],Ee=["src","alt"],we=["href","target"],Oe=["innerHTML"],Ne={class:"flex flex-col"},xe={key:0},Ie=e.defineComponent({__name:"MclHeaderB",props:{logo:{},logoAlt:{default:""},title:{},titleSize:{default:"md"},titleColor:{default:"dark-3"},titleBlockAsLink:{type:Boolean,default:!1},titleBlockLinkTarget:{default:"_self"},titleBlockLink:{},menuItems:{},menuItemAsLink:{type:Boolean,default:!1},menuTextSize:{default:"md"},menuTextColor:{default:"dark-3"},menuTextBold:{type:Boolean,default:!1},displayHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},bgColor:{default:"light-1"},drawerBtnColor:{default:"dark-1"},drawerBtnBorder:{type:Boolean,default:!0},headerWidth:{default:160}},emits:["toggle-drawer","title-click","menu-click","collapse-click"],setup(k,{expose:T,emit:b}){const p=k,f=e.useSlots(),C=b,i=e.ref(),d=e.ref(),u=(l,c)=>{C("toggle-drawer",l,c)},B=()=>{var l;(l=i.value)==null||l.headerClose()},a=()=>{for(let l=0;l<d.value.length;l++)d.value[l].closeCollapse()},n=l=>{const{titleBlockAsLink:c,titleBlockLink:s,titleBlockLinkTarget:h}=p;c||l.preventDefault(),C("title-click",l,s,h),B(),a()},r=(l,c)=>{const{menuItemAsLink:s}=p;s||l.preventDefault(),C("menu-click",l,c),B(),a()},o=(l,c,s)=>{C("collapse-click",l,c,s)},m=e.computed(()=>{const{titleSize:l,titleColor:c}=p;return[t("H3",l),t("TEXTCOLOR",c)].join(" ")}),g=l=>{const c=l;return typeof c.children>"u"?!1:c.children.length>0};return T({headerClose:B}),(l,c)=>(e.openBlock(),e.createBlock(e.unref(t.HeaderVertical),{"bg-color":l.bgColor,"drawer-btn-color":l.drawerBtnColor,"drawer-btn-border":l.drawerBtnBorder,"header-width":l.headerWidth,onToggleDrawer:u,ref_key:"componentRef",ref:i},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),content:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",pe,[e.createElementVNode("a",{href:l.titleBlockLink,target:l.titleBlockLinkTarget,onClick:n},[e.createElementVNode("img",{src:l.logo,alt:l.logoAlt,class:"h-full inline-block max-h-xl"},null,8,ue)],8,ke)]),e.createElementVNode("div",null,[e.createElementVNode("a",{href:l.titleBlockLink,target:l.titleBlockLinkTarget,onClick:n},[e.createElementVNode("h3",{class:e.normalizeClass([m.value,"text-center mb-md"]),innerHTML:l.title},null,10,Ce)],8,ge)]),e.createElementVNode("ul",Be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.menuItems,(s,h)=>(e.openBlock(),e.createElementBlock("li",{key:`menu-${h}`},[g(s)?(e.openBlock(),e.createBlock(z,{key:1,ref_for:!0,ref_key:"collapseRef",ref:d,"nav-id":s.title,"nav-location":"desktop","nav-accordion-group":l.title,"menu-item":s,"as-link":l.menuItemAsLink,"text-color":l.menuTextColor,"text-size":l.menuTextSize,"font-bold":l.menuTextBold,"d-hl":l.displayHighlight,"hl-color":l.highlightColor,onChildClick:r,onLabelClick:o},null,8,["nav-id","nav-accordion-group","menu-item","as-link","text-color","text-size","font-bold","d-hl","hl-color"])):(e.openBlock(),e.createBlock(V,{key:0,"menu-item":s,"as-link":l.menuItemAsLink,"text-color":l.menuTextColor,"text-size":l.menuTextSize,"font-bold":l.menuTextBold,"d-hl":l.displayHighlight,"hl-color":l.highlightColor,onMenuClick:r},null,8,["menu-item","as-link","text-color","text-size","font-bold","d-hl","hl-color"]))]))),128))])])]),"content-bottom":e.withCtx(()=>[e.unref(f)["content-bottom"]?(e.openBlock(),e.createElementBlock("div",be,[e.renderSlot(l.$slots,"content-bottom")])):e.createCommentVNode("",!0)]),"mobile-content":e.withCtx(({headerClose:s})=>[e.createElementVNode("div",Te,[e.createElementVNode("div",null,[e.createElementVNode("div",ye,[e.createElementVNode("a",{href:l.titleBlockLink,target:l.titleBlockLinkTarget,onClick:n},[e.createElementVNode("img",{src:l.logo,alt:l.logoAlt,class:"h-full inline-block max-h-xl"},null,8,Ee)],8,Le)]),e.createElementVNode("div",null,[e.createElementVNode("a",{href:l.titleBlockLink,target:l.titleBlockLinkTarget,onClick:n},[e.createElementVNode("h3",{class:e.normalizeClass([m.value,"text-center mb-md"]),innerHTML:l.title},null,10,Oe)],8,we)]),e.createElementVNode("ul",Ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.menuItems,(h,E)=>(e.openBlock(),e.createElementBlock("li",{key:`menu-${E}`},[g(h)?(e.openBlock(),e.createBlock(z,{key:1,"nav-id":h.title,"nav-location":"mobile","nav-accordion-group":l.title,"menu-item":h,"as-link":l.menuItemAsLink,"text-color":l.menuTextColor,"text-size":l.menuTextSize,"font-bold":l.menuTextBold,"d-hl":l.displayHighlight,"hl-color":l.highlightColor,onChildClick:r,onLabelClick:o},null,8,["nav-id","nav-accordion-group","menu-item","as-link","text-color","text-size","font-bold","d-hl","hl-color"])):(e.openBlock(),e.createBlock(V,{key:0,"menu-item":h,"as-link":l.menuItemAsLink,"text-color":l.menuTextColor,"text-size":l.menuTextSize,"font-bold":l.menuTextBold,"d-hl":l.displayHighlight,"hl-color":l.highlightColor,onMenuClick:r},null,8,["menu-item","as-link","text-color","text-size","font-bold","d-hl","hl-color"]))]))),128))])]),e.unref(f)["mobile-bottom"]?(e.openBlock(),e.createElementBlock("div",xe,[e.renderSlot(l.$slots,"mobile-bottom",{headerClose:s})])):e.createCommentVNode("",!0)])]),_:3},8,["bg-color","drawer-btn-color","drawer-btn-border","header-width"]))}});L.MclHeaderA=ae,L.MclHeaderB=Ie,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
|
|
2
|
+
(function(L,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@bobbykim/manguito-theme")):typeof define=="function"&&define.amd?define(["exports","vue","@bobbykim/manguito-theme"],e):(L=typeof globalThis<"u"?globalThis:L||self,e(L.MclHeader={},L.Vue,L.ManguitoTheme))})(this,function(L,e,t){"use strict";const $=k=>(e.pushScopeId("data-v-1b1467b6"),k=k(),e.popScopeId(),k),S={class:"flex flex-col w-full"},H={class:"self-center"},R=[$(()=>e.createElementVNode("path",{d:"M224 416c-8.188 0-16.38-3.125-22.62-9.375l-192-192c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L224 338.8l169.4-169.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-192 192C240.4 412.9 232.2 416 224 416z"},null,-1))],A={class:"relative pt-2xs"},D={class:"relative flex flex-col"},X=["href","target","onClick"],_=e.defineComponent({__name:"NavCollapse",props:{navId:{},navAccordionGroup:{},navItem:{},bgColor:{default:"light-2"},hoverBgColor:{default:"dark-1"},menuTextSize:{default:"md"},menuTextColor:{default:"dark-3"},menuTextBold:{type:Boolean,default:!1},displayHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},asLink:{type:Boolean,default:!0}},emits:["child-click","label-click"],setup(k,{emit:T}){const b=k,p=T,f=e.ref(!1),C=e.computed(()=>{const{navId:n}=b;return`nav-${n.toLowerCase().replaceAll(" ","-")}`}),i=e.computed(()=>{const{navAccordionGroup:n}=b;return`accordion-${n.toLocaleLowerCase().replaceAll(" ","-")}`}),d=n=>{f.value=n},u=(n,r)=>{p("label-click",n,r,f.value)},B=(n,r)=>{const{asLink:o}=b;!o&&n.preventDefault(),p("child-click",n,r)},a=(n,r,o)=>{const m=[t("BODYTEXT",n),t("TEXTCOLOR",r)];return o&&m.push("font-bold"),m.join(" ")};return(n,r)=>(e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("div",H,[e.withDirectives((e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["tracking-wider align-middle outline-none nav__text flex items-center gap-3xs",a(n.menuTextSize,n.menuTextColor,n.menuTextBold)]),onClick:r[0]||(r[0]=o=>u(o,n.navItem.title))},[e.createElementVNode("span",null,e.toDisplayString(n.navItem.title),1),(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",class:e.normalizeClass(["h-[0.8rem] fill-current",[f.value?"rotate-180":"rotate-0","transition-transform duration-300 ease-in"]])},R,2))],2)),[[e.unref(t.vCollapse),void 0,C.value]]),n.displayHighlight?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["relative -top-[2px] h-[6px] nav__decorator",e.unref(t)("BEFOREBG",n.highlightColor)])},null,2)):e.createCommentVNode("",!0)]),e.createVNode(e.unref(t.Collapse),{id:C.value,visible:!1,accordion:i.value,onOpen:d,onClose:d},{default:e.withCtx(()=>[e.createElementVNode("div",A,[n.displayHighlight?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["absolute w-md bg-opacity-25 -left-4 h-full",e.unref(t)("BGCOLOR",n.highlightColor)])},null,2)):e.createCommentVNode("",!0),e.createElementVNode("div",D,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.navItem.children,(o,m)=>(e.openBlock(),e.createElementBlock("a",{href:o.url,target:o.target,class:e.normalizeClass(["w-full pb-2xs last:pb-0",[e.unref(t)("TEXTCOLOR",n.menuTextColor),e.unref(t)("BODYTEXT",n.menuTextSize)]]),key:m,onClick:g=>B(g,o)},e.toDisplayString(o.title),11,X))),128))])])]),_:1},8,["id","accordion"])]))}}),I=(k,T)=>{const b=k.__vccOpts||k;for(const[p,f]of T)b[p]=f;return b},M=I(_,[["__scopeId","data-v-1b1467b6"]]),j=k=>(e.pushScopeId("data-v-3cd6e9eb"),k=k(),e.popScopeId(),k),F=["onClick"],G=[j(()=>e.createElementVNode("path",{d:"M224 416c-8.188 0-16.38-3.125-22.62-9.375l-192-192c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L224 338.8l169.4-169.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-192 192C240.4 412.9 232.2 416 224 416z"},null,-1))],K=["href","target","onClick"],Y=I(e.defineComponent({__name:"NavDropdown",props:{navItem:{},bgColor:{default:"light-1"},menuTextSize:{default:"md"},menuTextColor:{default:"dark-3"},menuTextBold:{type:Boolean,default:!1},displayHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},asLink:{type:Boolean,default:!0}},emits:["label-click","child-click"],setup(k,{emit:T}){const b=k,p=T,f=e.ref(-1),C=e.ref(),i=(a,n,r)=>{const o=[t("BODYTEXT",a),t("TEXTCOLOR",n)];return r&&o.push("font-bold"),o.join(" ")},d=a=>{const n=b.navItem.children.length;C.value!==void 0&&(a==="down"&&f.value<n-1&&f.value++,a==="up"&&f.value>0&&f.value--,C.value[f.value].focus())},u=(a,n,r)=>{f.value=-1,p("label-click",a,n,r)},B=(a,n)=>{const{asLink:r}=b;!r&&a.preventDefault(),p("child-click",a,n)};return(a,n)=>(e.openBlock(),e.createElementBlock("div",{onKeyup:[n[0]||(n[0]=e.withKeys(r=>d("down"),["down"])),n[1]||(n[1]=e.withKeys(r=>d("up"),["up"]))]},[e.createVNode(e.unref(t.DropdownContainer),null,{toggler:e.withCtx(({toggle:r,dropdownState:o})=>[e.createElementVNode("div",null,[e.createElementVNode("button",{class:e.normalizeClass(["tracking-wider align-middle outline-none nav__text flex items-center gap-3xs",i(a.menuTextSize,a.menuTextColor,a.menuTextBold)]),onClick:m=>(r(m),u(m,a.navItem.title,o))},[e.createElementVNode("span",null,e.toDisplayString(a.navItem.title),1),(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",class:e.normalizeClass(["h-[0.8rem] fill-current",[o?"rotate-180":"rotate-0","transition-transform duration-300 ease-in"]])},G,2))],10,F),a.displayHighlight?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["relative -top-[2px] h-[6px] nav__decorator",e.unref(t)("BEFOREBG",a.highlightColor)])},null,2)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createVNode(e.unref(t.DropdownContent),{className:"border drop-shadow-sm"},{default:e.withCtx(({itemClick:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.navItem.children,(o,m)=>(e.openBlock(),e.createElementBlock("a",{href:o.url,target:o.target,key:m,ref_for:!0,ref_key:"navItemRef",ref:C,class:e.normalizeClass(["px-xs py-2xs block w-full hover:bg-opacity-50 focus:bg-opacity-50 transition-all duration-200 ease-linear",[e.unref(t)("BGCOLOR",a.bgColor),e.unref(t)("HVBGCOLOR",a.highlightColor),e.unref(t)("FCBGCOLOR",a.highlightColor),e.unref(t)("TEXTCOLOR",a.menuTextColor),e.unref(t)("BODYTEXT",a.menuTextSize)]]),onClick:g=>(r(),B(g,o))},e.toDisplayString(o.title),11,K))),128))]),_:1})]),_:1})],32))}}),[["__scopeId","data-v-3cd6e9eb"]]),q=["href","target","innerHTML"],x=I(e.defineComponent({__name:"NavLink",props:{navItem:{},menuTextSize:{default:"md"},menuTextColor:{default:"dark-3"},menuTextBold:{type:Boolean,default:!1},displayHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},asLink:{type:Boolean,default:!0}},emits:["nav-link"],setup(k,{emit:T}){const b=k,p=T,f=(i,d,u)=>{const B=[t("BODYTEXT",i),t("TEXTCOLOR",d)];return u&&B.push("font-bold"),B.join(" ")},C=(i,d)=>{const{asLink:u}=b;!u&&i.preventDefault(),p("nav-link",i,d)};return(i,d)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("a",{href:i.navItem.url,target:i.navItem.target,innerHTML:i.navItem.title,class:e.normalizeClass(["tracking-wider outline-none nav__text",f(i.menuTextSize,i.menuTextColor,i.menuTextBold)]),onClick:d[0]||(d[0]=u=>C(u,i.navItem))},null,10,q),i.displayHighlight?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["relative -top-[2px] h-[6px] nav__decorator",e.unref(t)("BEFOREBG",i.highlightColor)])},null,2)):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-94d8fa7b"]]),W={class:"flex flex-shrink-0 items-center self-center"},P={class:"h-md md:h-lg lg:h-xl mr-2xs md:mr-sm align-middle"},U=["href","target"],J=["src","alt"],Q=["src","alt"],Z={class:"flex flex-col justify-center ml-2"},v=["href","target"],ee=["innerHTML"],le={class:"hidden lg:flex flex-wrap"},oe={key:0,class:"hidden lg:block"},te={class:"flex flex-col items-center justify-center p-xs"},ne={key:0},ie=e.defineComponent({__name:"MclHeaderA",props:{logo:{},logoSmall:{},logoAlt:{default:""},title:{},titleSize:{default:"md"},titleColor:{default:"dark-3"},titleBlockAsLink:{type:Boolean,default:!1},titleBlockLinkTarget:{default:"_self"},titleBlockLink:{},menuItems:{},menuItemAsLink:{type:Boolean,default:!1},menuTextSize:{default:"md"},menuTextColor:{default:"dark-3"},menuTextBold:{type:Boolean,default:!1},displayHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},bgColor:{default:"light-1"},mobileMenuBgColor:{default:"light-2"},drawerBtnColor:{default:"dark-1"},drawerBtnBorder:{type:Boolean,default:!0},fadeInOnScroll:{type:Boolean,default:!0},scrollDistance:{default:50}},emits:["toggle-drawer","title-click","menu-click","collapse-click"],setup(k,{expose:T,emit:b}){const p=k,f=e.ref(),C=e.useSlots(),i=b,d=()=>{var o;(o=f.value)==null||o.headerClose()},u=o=>{const{titleBlockAsLink:m,titleBlockLink:g,titleBlockLinkTarget:l}=p;m||o.preventDefault(),i("title-click",o,g,l),d()},B=(o,m)=>{const{menuItemAsLink:g}=p;g||o.preventDefault(),i("menu-click",o,m),d()},a=(o,m,g)=>{i("collapse-click",o,m,g)},n=(o,m)=>[t("H2",o),t("TEXTCOLOR",m)].join(" "),r=o=>{const m=o;return typeof m.children>"u"?!1:m.children.length>0};return T({headerClose:d}),(o,m)=>(e.openBlock(),e.createBlock(e.unref(t.HeaderHorizontal),{ref_key:"componentRef",ref:f,"bg-color":o.bgColor,"drawer-btn-border":o.drawerBtnBorder,"drawer-btn-color":o.drawerBtnColor,"fade-in-on-scroll":o.fadeInOnScroll,"mobile-menu-bg-color":o.mobileMenuBgColor},{content:e.withCtx(()=>[e.createElementVNode("div",W,[e.createElementVNode("div",P,[e.createElementVNode("a",{href:o.titleBlockLink,target:o.titleBlockLinkTarget,onClick:u},[e.createElementVNode("img",{src:o.logo,alt:o.logoAlt,class:e.normalizeClass(["h-full",[o.logoSmall?"hidden lg:inline-block":"inline-block"]])},null,10,J),o.logoSmall?(e.openBlock(),e.createElementBlock("img",{key:0,src:o.logoSmall,alt:o.logoAlt,class:"inline-block lg:hidden h-full"},null,8,Q)):e.createCommentVNode("",!0)],8,U)]),e.createElementVNode("div",Z,[e.createElementVNode("a",{href:o.titleBlockLink,target:o.titleBlockLinkTarget,onClick:u},[e.createElementVNode("h2",{class:e.normalizeClass(["inline-block align-middle tracking-wider",n(o.titleSize,o.titleColor)]),innerHTML:o.title},null,10,ee)],8,v),e.createElementVNode("ul",le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.menuItems,(g,l)=>(e.openBlock(),e.createElementBlock("li",{class:"mr-xs last:mr-0",key:`menu-${l}`},[r(g)?(e.openBlock(),e.createBlock(Y,{key:1,"nav-item":g,"menu-text-color":o.menuTextColor,"menu-text-size":o.menuTextSize,"menu-text-bold":o.menuTextBold,"display-highlight":o.displayHighlight,"highlight-color":o.highlightColor,"bg-color":o.bgColor,"as-link":o.menuItemAsLink,onChildClick:B,onLabelClick:a},null,8,["nav-item","menu-text-color","menu-text-size","menu-text-bold","display-highlight","highlight-color","bg-color","as-link"])):(e.openBlock(),e.createBlock(x,{key:0,"nav-item":g,"menu-text-color":o.menuTextColor,"menu-text-size":o.menuTextSize,"menu-text-bold":o.menuTextBold,"display-highlight":o.displayHighlight,"highlight-color":o.highlightColor,"as-link":o.menuItemAsLink,onNavLink:B},null,8,["nav-item","menu-text-color","menu-text-size","menu-text-bold","display-highlight","highlight-color","as-link"]))]))),128))])])])]),"content-right":e.withCtx(()=>[C["content-right"]?(e.openBlock(),e.createElementBlock("div",oe,[e.renderSlot(o.$slots,"content-right")])):e.createCommentVNode("",!0)]),"mobile-content":e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("ul",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.menuItems,(g,l)=>(e.openBlock(),e.createElementBlock("li",{class:"mb-2xs last:mb-0",key:`mobile-${l}`},[r(g)?(e.openBlock(),e.createBlock(M,{key:1,"nav-id":g.title,"nav-item":g,"menu-text-color":o.menuTextColor,"menu-text-size":o.menuTextSize,"menu-text-bold":o.menuTextBold,"display-highlight":o.displayHighlight,"highlight-color":o.highlightColor,"nav-accordion-group":o.title,"as-link":o.menuItemAsLink,onChildClick:B,onLabelClick:a},null,8,["nav-id","nav-item","menu-text-color","menu-text-size","menu-text-bold","display-highlight","highlight-color","nav-accordion-group","as-link"])):(e.openBlock(),e.createBlock(x,{key:0,"nav-item":g,"menu-text-color":o.menuTextColor,"menu-text-size":o.menuTextSize,"menu-text-bold":o.menuTextBold,"display-highlight":o.displayHighlight,"highlight-color":o.highlightColor,"as-link":o.menuItemAsLink,onNavLink:B},null,8,["nav-item","menu-text-color","menu-text-size","menu-text-bold","display-highlight","highlight-color","as-link"]))]))),128))]),C["mobile-bottom"]?(e.openBlock(),e.createElementBlock("div",ne,[e.renderSlot(o.$slots,"mobile-bottom",{headerClose:d})])):e.createCommentVNode("",!0)])]),_:3},8,["bg-color","drawer-btn-border","drawer-btn-color","fade-in-on-scroll","mobile-menu-bg-color"]))}}),re={class:"relative flex gap-2 items-center justify-center"},ae=[e.createElementVNode("path",{d:"M224 416c-8.188 0-16.38-3.125-22.62-9.375l-192-192c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L224 338.8l169.4-169.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-192 192C240.4 412.9 232.2 416 224 416z"},null,-1)],se=["href","target","onClick"],ce={class:"relative"},z=e.defineComponent({__name:"NavCollapseVertical",props:{navId:{},navAccordionGroup:{},navLocation:{},menuItem:{},textColor:{default:"dark-3"},textSize:{default:"md"},fontBold:{type:Boolean,default:!1},dHl:{type:Boolean,default:!0},hlColor:{default:"primary"},asLink:{type:Boolean,default:!0}},emits:["label-click","child-click"],setup(k,{expose:T,emit:b}){const p=k,f=e.ref(!1),C=e.ref(),i=b,d=l=>{f.value=l},u=()=>{var l;(l=C.value)==null||l.close()},B=(l,c)=>{i("label-click",l,c,f.value)},a=(l,c)=>{var h;const{asLink:s}=p;s||l.preventDefault(),i("child-click",l,c),(h=C.value)==null||h.close(),u()},n=e.computed(()=>{const{navId:l,navLocation:c}=p,h=l.toLowerCase().replaceAll(" ","-");return`nav-${c}-${h}`}),r=e.computed(()=>{const{navAccordionGroup:l,navLocation:c}=p,s=l.toLowerCase().replaceAll(" ","-");return`nav-accordion-group-${c}-${s}`}),o=e.computed(()=>{const{textColor:l,textSize:c,dHl:s,hlColor:h,fontBold:E}=p,y=[t("BODYTEXT",c)];if(!s){const O=[t("TEXTCOLOR",l),t("HVTEXTCOLOR",h),t("FCTEXTCOLOR",h)];y.push(O.join(" "))}if(s){const O=t("BEFOREBG",h);y.push("before:inset-y-0 before:left-0 before:transition-[width] before:duration-300 before:ease-linear before:w-0 hover:before:w-full focus:before:w-full "+O);const N=[t("TEXTCOLOR",h),t("HVTEXTCOLOR",l),t("FCTEXTCOLOR",l)];y.push(N.join(" "))}return E&&y.push("font-bold"),y.join(" ")}),m=e.computed(()=>{const{dHl:l,hlColor:c,navLocation:s}=p,h=[];if(!l)return"";const E="before:absolute before:w-xs before:h-full before:bg-primary before:bg-opacity-70 ",y=s==="desktop"?"before:left-0 ":"before:right-0 ";return h.push(E+y+t("BEFOREBG",c)),h.join(" ")}),g=e.computed(()=>{const{textColor:l,textSize:c,dHl:s,hlColor:h,fontBold:E,navLocation:y}=p;let O=c==="xl"?"lg":c==="lg"?"md":c==="md"?"sm":"xs";const w=[t("TEXTCOLOR",l),t("BODYTEXT",O)];if(y==="mobile"&&w.push("text-end"),!s){const N=[t("TEXTCOLOR",l),t("HVTEXTCOLOR",h),t("FCTEXTCOLOR",h)];w.push(N.join(" "))}if(s){const N=t("BEFOREBG",h),Ie="before:inset-y-0 before:duration-300 before:ease-linear before:w-0 hover:before:w-full focus:before:w-full before:bg-opacity-70 ",xe=y==="desktop"?"before:left-0 before:transition-[width] ":"before:left-full hover:before:left-0 focus:before:left-0 before:transition-[all] ";w.push(Ie+xe+N);const ze=[t("TEXTCOLOR",h),t("HVTEXTCOLOR",l),t("FCTEXTCOLOR",l)];w.push(ze.join(" "))}return E&&w.push("font-bold"),w.join(" ")});return T({closeCollapse:u}),(l,c)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives((e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["px-xs py-2xs relative text-center block w-full before:absolute transition-colors duration-300 ease-linear",[o.value]]),onClick:c[0]||(c[0]=s=>B(s,l.menuItem.title))},[e.createElementVNode("div",re,[e.createElementVNode("span",null,e.toDisplayString(l.menuItem.title),1),(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",class:e.normalizeClass(["h-[0.8rem] fill-current",[f.value?"rotate-180":"rotate-0","transition-transform duration-300 ease-in"]])},ae,2))])],2)),[[e.unref(t.vCollapse),void 0,n.value]]),e.createVNode(e.unref(t.Collapse),{ref_key:"collapseRef",ref:C,id:n.value,accordion:r.value,onOpen:d,onClose:d},{default:e.withCtx(()=>[e.createElementVNode("ul",{class:e.normalizeClass(["relative",[m.value]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.menuItem.children,(s,h)=>(e.openBlock(),e.createElementBlock("li",{key:h,class:e.normalizeClass([l.navLocation==="desktop"?"ml-xs":"mr-xs"])},[e.createElementVNode("a",{href:s.url,target:s.target,onClick:E=>a(E,s),class:e.normalizeClass(["relative before:absolute w-full px-2xs py-3xs block overflow-x-hidden transition-colors duration-300 ease-linear",[g.value]])},[e.createElementVNode("span",ce,e.toDisplayString(s.title),1)],10,se)],2))),128))],2)]),_:1},8,["id","accordion"])]))}}),de=["href","target"],me={class:"relative"},V=e.defineComponent({__name:"NavLinkVertical",props:{menuItem:{},textColor:{default:"dark-3"},textSize:{default:"md"},fontBold:{type:Boolean,default:!1},dHl:{type:Boolean,default:!0},hlColor:{default:"primary"},asLink:{type:Boolean,default:!0}},emits:["menu-click"],setup(k,{emit:T}){const b=k,p=T,f=(i,d)=>{const{asLink:u}=b;u||i.preventDefault(),p("menu-click",i,d)},C=e.computed(()=>{const{textColor:i,textSize:d,dHl:u,hlColor:B,fontBold:a}=b,n=[t("BODYTEXT",d)];if(!u){const r=[t("TEXTCOLOR",i),t("HVTEXTCOLOR",B),t("FCTEXTCOLOR",B)];n.push(r.join(" "))}if(u){const r=t("BEFOREBG",B);n.push("before:inset-y-0 before:left-0 before:transition-[width] before:duration-300 before:ease-linear before:w-0 hover:before:w-full focus:before:w-full "+r);const m=[t("TEXTCOLOR",B),t("HVTEXTCOLOR",i),t("FCTEXTCOLOR",i)];n.push(m.join(" "))}return a&&n.push("font-bold"),n.join(" ")});return(i,d)=>(e.openBlock(),e.createElementBlock("a",{class:e.normalizeClass([[C.value],"px-xs py-2xs relative text-center block w-full before:absolute transition-colors duration-300 ease-linear"]),href:i.menuItem.url,target:i.menuItem.target?i.menuItem.target:"_self",onClick:d[0]||(d[0]=u=>f(u,i.menuItem))},[e.createElementVNode("span",me,e.toDisplayString(i.menuItem.title),1)],10,de))}}),he={class:"p-md text-center"},fe=["href","target"],pe=["src","alt"],ke=["href","target"],ue=["innerHTML"],ge={class:"flex flex-col"},Ce={key:0},Be={class:"flex flex-col justify-between h-full"},be={class:"p-md text-center"},Te=["href","target"],ye=["src","alt"],Le=["href","target"],Ee=["innerHTML"],we={class:"flex flex-col"},Oe={key:0},Ne=e.defineComponent({__name:"MclHeaderB",props:{logo:{},logoAlt:{default:""},title:{},titleSize:{default:"md"},titleColor:{default:"dark-3"},titleBlockAsLink:{type:Boolean,default:!1},titleBlockLinkTarget:{default:"_self"},titleBlockLink:{},menuItems:{},menuItemAsLink:{type:Boolean,default:!1},menuTextSize:{default:"md"},menuTextColor:{default:"dark-3"},menuTextBold:{type:Boolean,default:!1},displayHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},bgColor:{default:"light-1"},drawerBtnColor:{default:"dark-1"},drawerBtnBorder:{type:Boolean,default:!0},headerWidth:{default:160}},emits:["toggle-drawer","title-click","menu-click","collapse-click"],setup(k,{expose:T,emit:b}){const p=k,f=e.useSlots(),C=b,i=e.ref(),d=e.ref(),u=(l,c)=>{C("toggle-drawer",l,c)},B=()=>{var l;(l=i.value)==null||l.headerClose()},a=()=>{for(let l=0;l<d.value.length;l++)d.value[l].closeCollapse()},n=l=>{const{titleBlockAsLink:c,titleBlockLink:s,titleBlockLinkTarget:h}=p;c||l.preventDefault(),C("title-click",l,s,h),B(),a()},r=(l,c)=>{const{menuItemAsLink:s}=p;s||l.preventDefault(),C("menu-click",l,c),B(),a()},o=(l,c,s)=>{C("collapse-click",l,c,s)},m=e.computed(()=>{const{titleSize:l,titleColor:c}=p;return[t("H3",l),t("TEXTCOLOR",c)].join(" ")}),g=l=>{const c=l;return typeof c.children>"u"?!1:c.children.length>0};return T({headerClose:B}),(l,c)=>(e.openBlock(),e.createBlock(e.unref(t.HeaderVertical),{"bg-color":l.bgColor,"drawer-btn-color":l.drawerBtnColor,"drawer-btn-border":l.drawerBtnBorder,"header-width":l.headerWidth,onToggleDrawer:u,ref_key:"componentRef",ref:i},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),content:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",he,[e.createElementVNode("a",{href:l.titleBlockLink,target:l.titleBlockLinkTarget,onClick:n},[e.createElementVNode("img",{src:l.logo,alt:l.logoAlt,class:"h-full inline-block max-h-xl"},null,8,pe)],8,fe)]),e.createElementVNode("div",null,[e.createElementVNode("a",{href:l.titleBlockLink,target:l.titleBlockLinkTarget,onClick:n},[e.createElementVNode("h3",{class:e.normalizeClass([m.value,"text-center mb-md"]),innerHTML:l.title},null,10,ue)],8,ke)]),e.createElementVNode("ul",ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.menuItems,(s,h)=>(e.openBlock(),e.createElementBlock("li",{key:`menu-${h}`},[g(s)?(e.openBlock(),e.createBlock(z,{key:1,ref_for:!0,ref_key:"collapseRef",ref:d,"nav-id":s.title,"nav-location":"desktop","nav-accordion-group":l.title,"menu-item":s,"as-link":l.menuItemAsLink,"text-color":l.menuTextColor,"text-size":l.menuTextSize,"font-bold":l.menuTextBold,"d-hl":l.displayHighlight,"hl-color":l.highlightColor,onChildClick:r,onLabelClick:o},null,8,["nav-id","nav-accordion-group","menu-item","as-link","text-color","text-size","font-bold","d-hl","hl-color"])):(e.openBlock(),e.createBlock(V,{key:0,"menu-item":s,"as-link":l.menuItemAsLink,"text-color":l.menuTextColor,"text-size":l.menuTextSize,"font-bold":l.menuTextBold,"d-hl":l.displayHighlight,"hl-color":l.highlightColor,onMenuClick:r},null,8,["menu-item","as-link","text-color","text-size","font-bold","d-hl","hl-color"]))]))),128))])])]),"content-bottom":e.withCtx(()=>[f["content-bottom"]?(e.openBlock(),e.createElementBlock("div",Ce,[e.renderSlot(l.$slots,"content-bottom")])):e.createCommentVNode("",!0)]),"mobile-content":e.withCtx(({headerClose:s})=>[e.createElementVNode("div",Be,[e.createElementVNode("div",null,[e.createElementVNode("div",be,[e.createElementVNode("a",{href:l.titleBlockLink,target:l.titleBlockLinkTarget,onClick:n},[e.createElementVNode("img",{src:l.logo,alt:l.logoAlt,class:"h-full inline-block max-h-xl"},null,8,ye)],8,Te)]),e.createElementVNode("div",null,[e.createElementVNode("a",{href:l.titleBlockLink,target:l.titleBlockLinkTarget,onClick:n},[e.createElementVNode("h3",{class:e.normalizeClass([m.value,"text-center mb-md"]),innerHTML:l.title},null,10,Ee)],8,Le)]),e.createElementVNode("ul",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.menuItems,(h,E)=>(e.openBlock(),e.createElementBlock("li",{key:`menu-${E}`},[g(h)?(e.openBlock(),e.createBlock(z,{key:1,"nav-id":h.title,"nav-location":"mobile","nav-accordion-group":l.title,"menu-item":h,"as-link":l.menuItemAsLink,"text-color":l.menuTextColor,"text-size":l.menuTextSize,"font-bold":l.menuTextBold,"d-hl":l.displayHighlight,"hl-color":l.highlightColor,onChildClick:r,onLabelClick:o},null,8,["nav-id","nav-accordion-group","menu-item","as-link","text-color","text-size","font-bold","d-hl","hl-color"])):(e.openBlock(),e.createBlock(V,{key:0,"menu-item":h,"as-link":l.menuItemAsLink,"text-color":l.menuTextColor,"text-size":l.menuTextSize,"font-bold":l.menuTextBold,"d-hl":l.displayHighlight,"hl-color":l.highlightColor,onMenuClick:r},null,8,["menu-item","as-link","text-color","text-size","font-bold","d-hl","hl-color"]))]))),128))])]),f["mobile-bottom"]?(e.openBlock(),e.createElementBlock("div",Oe,[e.renderSlot(l.$slots,"mobile-bottom",{headerClose:s})])):e.createCommentVNode("",!0)])]),_:3},8,["bg-color","drawer-btn-color","drawer-btn-border","header-width"]))}});L.MclHeaderA=ie,L.MclHeaderB=Ne,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bobbykim/mcl-header",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "header components based on manguito theme",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"license": "MIT",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@bobbykim/manguito-theme": "0.
|
|
36
|
+
"@bobbykim/manguito-theme": "0.21.0",
|
|
37
37
|
"vue": "^3.3.10"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"vite-plugin-dts": "^3.8.3",
|
|
46
46
|
"vue-tsc": "^1.8.25"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "e2e70414089db93125eaa4855b0c0a33f1c0ecbf"
|
|
49
49
|
}
|