@phila/phila-ui-app-header 0.1.0-beta.4 → 0.1.0-beta.5

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/index.mjs ADDED
@@ -0,0 +1,674 @@
1
+ import { ref as C, reactive as ie, onBeforeMount as se, onUnmounted as J, defineComponent as E, useSlots as fe, computed as le, createElementBlock as m, openBlock as d, Fragment as I, createElementVNode as i, createCommentVNode as _, unref as n, createTextVNode as z, createVNode as w, renderSlot as x, normalizeProps as W, guardReactiveProps as ae, mergeProps as P, withModifiers as me, createBlock as k, withCtx as M, resolveDynamicComponent as U, normalizeClass as j, renderList as te, toDisplayString as H, withKeys as pe, useAttrs as he, useTemplateRef as ge, watch as be, onMounted as ke, normalizeStyle as ye } from "vue";
2
+ import { FontAwesomeIcon as A } from "@fortawesome/vue-fontawesome";
3
+ import './index.css';var xe = {
4
+ prefix: "fas",
5
+ iconName: "magnifying-glass",
6
+ icon: [512, 512, [128269, "search"], "f002", "M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376C296.3 401.1 253.9 416 208 416 93.1 416 0 322.9 0 208S93.1 0 208 0 416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]
7
+ }, Ce = xe, oe = {
8
+ prefix: "fas",
9
+ iconName: "xmark",
10
+ icon: [384, 512, [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], "f00d", "M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]
11
+ }, _e = oe, re = oe, we = {
12
+ prefix: "fas",
13
+ iconName: "lock",
14
+ icon: [384, 512, [128274], "f023", "M128 96l0 64 128 0 0-64c0-35.3-28.7-64-64-64s-64 28.7-64 64zM64 160l0-64C64 25.3 121.3-32 192-32S320 25.3 320 96l0 64c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64z"]
15
+ }, ce = {
16
+ prefix: "fas",
17
+ iconName: "caret-up",
18
+ icon: [320, 512, [], "f0d8", "M140.3 135.2c12.6-10.3 31.1-9.5 42.8 2.2l128 128c9.2 9.2 11.9 22.9 6.9 34.9S301.4 320 288.5 320l-256 0c-12.9 0-24.6-7.8-29.6-19.8S.7 274.5 9.9 265.4l128-128 2.4-2.2z"]
19
+ }, de = {
20
+ prefix: "fas",
21
+ iconName: "caret-down",
22
+ icon: [320, 512, [], "f0d7", "M140.3 376.8c12.6 10.2 31.1 9.5 42.8-2.2l128-128c9.2-9.2 11.9-22.9 6.9-34.9S301.4 192 288.5 192l-256 0c-12.9 0-24.6 7.8-29.6 19.8S.7 237.5 9.9 246.6l128 128 2.4 2.2z"]
23
+ }, Be = {
24
+ prefix: "fas",
25
+ iconName: "building-columns",
26
+ icon: [512, 512, ["bank", "institution", "museum", "university"], "f19c", "M271.9 20.2c-9.8-5.6-21.9-5.6-31.8 0l-224 128c-12.6 7.2-18.8 22-15.1 36S17.5 208 32 208l32 0 0 208 0 0-51.2 38.4C4.7 460.4 0 469.9 0 480 0 497.7 14.3 512 32 512l448 0c17.7 0 32-14.3 32-32 0-10.1-4.7-19.6-12.8-25.6l-51.2-38.4 0-208 32 0c14.5 0 27.2-9.8 30.9-23.8s-2.5-28.8-15.1-36l-224-128zM400 208l0 208-64 0 0-208 64 0zm-112 0l0 208-64 0 0-208 64 0zm-112 0l0 208-64 0 0-208 64 0zM256 96a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]
27
+ }, Le = {
28
+ prefix: "fas",
29
+ iconName: "bars",
30
+ icon: [448, 512, ["navicon"], "f0c9", "M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]
31
+ }, $e = {
32
+ prefix: "fas",
33
+ iconName: "circle-info",
34
+ icon: [512, 512, ["info-circle"], "f05a", "M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM224 160a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm-8 64l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]
35
+ }, Te = $e;
36
+ const Ae = "data:image/svg+xml,%3csvg%20width='16'%20height='11'%20viewBox='0%200%2016%2011'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20width='16'%20height='11'%20fill='url(%23pattern0_61022_1867)'/%3e%3cdefs%3e%3cpattern%20id='pattern0_61022_1867'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_61022_1867'%20transform='scale(0.0625%200.0909091)'/%3e%3c/pattern%3e%3cimage%20id='image0_61022_1867'%20width='16'%20height='11'%20preserveAspectRatio='none'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAMAAABBPP0LAAAAG1BMVEUdM7EeNLIeM7HgQCDaPh/bPh/bPx/////bPyBEby41AAAAUElEQVQI123MNw4CABDEwD3jC/9/MQ1BQrgeOSkIqYe2o2FZtthXgQLgbHVMZdlsfUQFQnHtjP1+8BUhBDKOqtmfot6ojqPzR7TjdU+f6vkED+IDPhTBcMAAAAAASUVORK5CYII='/%3e%3c/defs%3e%3c/svg%3e";
37
+ C("");
38
+ ie({
39
+ validateOnBlur: !1,
40
+ validateOnInput: !1,
41
+ validateOnChange: !1,
42
+ validateOnMount: !1,
43
+ required: !1,
44
+ isValid: !0,
45
+ errors: []
46
+ });
47
+ const B = C({}), L = C(), D = 400, Y = C(null);
48
+ function ue(e) {
49
+ const s = e?.group ?? "global", l = (t, v) => {
50
+ B.value[s][t] = v;
51
+ }, a = (t, v) => {
52
+ B.value[s] = { [t]: v };
53
+ }, u = (t) => B.value[s][t] ?? !1, c = (t) => {
54
+ l(t, !u(t));
55
+ }, r = (t) => {
56
+ a(t, !u(t));
57
+ }, o = () => {
58
+ B.value[s] = {};
59
+ }, f = (t) => {
60
+ t.key === "Escape" && (l(e.id, !1), p());
61
+ }, g = (t) => {
62
+ if (!e) return;
63
+ const v = t.target, [h] = Object.keys(B.value[s]).filter((X) => B.value[s][X] === !0), O = document.getElementById(h), F = document.querySelector(`[aria-controls="${h}"]`), R = v.getAttribute("aria-controls") === h || F?.contains(t.target);
64
+ O && !O.contains(v) && !R && (l(e.id, !1), p());
65
+ }, b = () => {
66
+ e && (L.value = setTimeout(() => {
67
+ l(e.id, !1), p();
68
+ }, D));
69
+ }, y = () => {
70
+ e && e.mouseOverToggle === !0 && (Y.value = e.id, L.value = setTimeout(() => {
71
+ N();
72
+ }, D));
73
+ }, V = () => {
74
+ e && e.mouseOverToggle === !0 && (Y.value = null, clearTimeout(L.value), L.value = setTimeout(() => {
75
+ Y.value !== e.id && (l(e.id, !1), p());
76
+ }, D));
77
+ }, K = (t) => {
78
+ if (!e) return;
79
+ const { relatedTarget: v } = t;
80
+ if (!v || v.getAttribute("aria-controls") === e.id)
81
+ return;
82
+ const h = document.getElementById(e.id);
83
+ h && h.contains(v) || (clearTimeout(L.value), L.value = setTimeout(() => {
84
+ e.openSingle ? a(e.id, !1) : l(e.id, !1), p();
85
+ }, D));
86
+ }, Q = () => {
87
+ e && (e.outsideClickClose && (document.addEventListener("click", g), document.addEventListener("touchend", g)), e.escapeKeyClose && document.addEventListener("keydown", f));
88
+ }, p = () => {
89
+ document.removeEventListener("click", g), document.removeEventListener("touchend", g), document.removeEventListener("keydown", f), document.removeEventListener("scroll", b);
90
+ }, S = (t) => {
91
+ e && (t?.preventDefault(), clearTimeout(L.value), Q());
92
+ }, q = (t) => {
93
+ e && (S(t), e.openSingle ? r(e.id) : c(e.id));
94
+ }, N = (t) => {
95
+ e && (S(t), e.openSingle ? a(e.id, !0) : l(e.id, !0));
96
+ };
97
+ return se(() => {
98
+ B.value[s] || o();
99
+ }), J(() => {
100
+ p();
101
+ }), {
102
+ state: B,
103
+ timeout: L,
104
+ toggle: c,
105
+ toggleSingle: r,
106
+ setCollapsed: l,
107
+ setSingleCollapsed: a,
108
+ isCollapsed: u,
109
+ reset: o,
110
+ onMouseEnter: y,
111
+ onMouseLeave: V,
112
+ focusChange: K,
113
+ onClickToggle: q,
114
+ onClickOpen: N
115
+ };
116
+ }
117
+ const Ee = {
118
+ id: "trusted-site",
119
+ class: "has-background-ghost-gray is-flex is-justify-space-between"
120
+ }, Me = { class: "trusted-wrap" }, Se = { class: "hidden-tablet trusted-toggle is-flex is-align-center" }, Ne = ["src"], Oe = ["aria-label", "aria-expanded"], ze = {
121
+ class: "icon",
122
+ "aria-hidden": "true"
123
+ }, Ie = { class: "hidden-desktop trusted-toggle is-flex is-align-center" }, De = ["aria-label", "aria-expanded"], Ge = {
124
+ class: "icon",
125
+ "aria-hidden": "true"
126
+ }, He = {
127
+ key: 0,
128
+ class: "trusted-translation is-flex is-align-center"
129
+ }, Ue = ["hidden"], je = { class: "trusted-site-info-content content has-text-body-small is-flex is-justify-space-between" }, Ve = { class: "info-item-wrap is-flex" }, Ke = { class: "info-item is-flex is-12-mobile is-align-flex-start is-flex-1 my-4" }, Qe = { class: "trusted-icon is-flex is-flex-column has-text-center" }, qe = { class: "icon circle-icon p-3 mb-2" }, Fe = { class: "info-item is-flex is-12-mobile is-align-flex-start is-flex-1 my-4" }, Re = { class: "trusted-icon is-flex is-flex-column has-text-center" }, Xe = { class: "icon circle-icon p-3 mb-2" }, Ye = { class: "info-content-close mt-4" }, Ze = /* @__PURE__ */ E({
130
+ __name: "TrustedSite",
131
+ setup(e) {
132
+ const s = fe(), { isCollapsed: l, onClickToggle: a } = ue({
133
+ id: "trusted-site-info",
134
+ escapeKeyClose: !0
135
+ }), u = le(() => l("trusted-site-info"));
136
+ return (c, r) => (d(), m(I, null, [
137
+ i("div", Ee, [
138
+ i("div", Me, [
139
+ i("div", Se, [
140
+ i("img", {
141
+ src: n(Ae),
142
+ alt: "",
143
+ class: "icon"
144
+ }, null, 8, Ne),
145
+ r[4] || (r[4] = i("div", { class: "content mx-2" }, "An official website of the City of Philadelphia government", -1)),
146
+ i("button", {
147
+ class: "phila-button is-extra-small",
148
+ "aria-label": `${u.value ? "Close" : "Open"} Trusted Site information panel`,
149
+ "aria-controls": "trusted-site-info",
150
+ "aria-expanded": u.value,
151
+ onClick: r[0] || (r[0] = //@ts-ignore
152
+ (...o) => n(a) && n(a)(...o))
153
+ }, [
154
+ r[3] || (r[3] = z(" Here's how you know ", -1)),
155
+ i("span", ze, [
156
+ w(n(A), {
157
+ icon: u.value ? n(ce) : n(de)
158
+ }, null, 8, ["icon"])
159
+ ])
160
+ ], 8, Oe)
161
+ ]),
162
+ i("div", Ie, [
163
+ i("button", {
164
+ class: "phila-button is-extra-small",
165
+ "aria-label": `${u.value ? "Close" : "Open"} Trusted Site information panel`,
166
+ "aria-controls": "trusted-site-info",
167
+ "aria-expanded": u.value,
168
+ onClick: r[1] || (r[1] = //@ts-ignore
169
+ (...o) => n(a) && n(a)(...o))
170
+ }, [
171
+ r[5] || (r[5] = z(" An official website ", -1)),
172
+ i("span", Ge, [
173
+ w(n(A), { icon: n(Te) }, null, 8, ["icon"])
174
+ ])
175
+ ], 8, De)
176
+ ])
177
+ ]),
178
+ n(s).translation ? (d(), m("div", He, [
179
+ x(c.$slots, "translation", {}, void 0, !0)
180
+ ])) : _("", !0)
181
+ ]),
182
+ i("div", {
183
+ id: "trusted-site-info",
184
+ class: "has-background-secondary px-6",
185
+ hidden: !u.value
186
+ }, [
187
+ i("div", je, [
188
+ i("div", Ve, [
189
+ i("div", Ke, [
190
+ i("div", Qe, [
191
+ i("div", qe, [
192
+ w(n(A), { icon: n(we) }, null, 8, ["icon"])
193
+ ]),
194
+ r[6] || (r[6] = i("span", { class: "has-text-bold" }, "https://", -1))
195
+ ]),
196
+ r[7] || (r[7] = i("div", { class: "trusted-text m-4" }, [
197
+ z(" The "),
198
+ i("strong", null, "https://"),
199
+ z(" in the address bar means your information is encrypted and can not be accessed by anyone else ")
200
+ ], -1))
201
+ ]),
202
+ i("div", Fe, [
203
+ i("div", Re, [
204
+ i("span", Xe, [
205
+ w(n(A), { icon: n(Be) }, null, 8, ["icon"])
206
+ ]),
207
+ r[8] || (r[8] = i("span", { class: "has-text-bold" }, ".gov", -1))
208
+ ]),
209
+ r[9] || (r[9] = i("div", { class: "trusted-text m-4" }, "Only government entities in the U.S. can end in .gov", -1))
210
+ ])
211
+ ]),
212
+ i("div", Ye, [
213
+ i("button", {
214
+ class: "phila-button phila-button--primary icon-button is-extra-small",
215
+ "aria-label": "Close Trusted Site information panel",
216
+ onClick: r[2] || (r[2] = //@ts-ignore
217
+ (...o) => n(a) && n(a)(...o))
218
+ }, [
219
+ w(n(A), { icon: n(_e) }, null, 8, ["icon"])
220
+ ])
221
+ ])
222
+ ])
223
+ ], 8, Ue)
224
+ ], 64));
225
+ }
226
+ }), ve = (e, s) => {
227
+ const l = e.__vccOpts || e;
228
+ for (const [a, u] of s)
229
+ l[a] = u;
230
+ return l;
231
+ }, We = /* @__PURE__ */ ve(Ze, [["__scopeId", "data-v-75d8aee7"]]);
232
+ C("");
233
+ ie({
234
+ validateOnBlur: !1,
235
+ validateOnInput: !1,
236
+ validateOnChange: !1,
237
+ validateOnMount: !1,
238
+ required: !1,
239
+ isValid: !0,
240
+ errors: []
241
+ });
242
+ const $ = C({}), T = C(), G = 400, Z = C(null);
243
+ function Je(e) {
244
+ const s = e?.group ?? "global", l = (t, v) => {
245
+ $.value[s][t] = v;
246
+ }, a = (t, v) => {
247
+ $.value[s] = { [t]: v };
248
+ }, u = (t) => $.value[s][t] ?? !1, c = (t) => {
249
+ l(t, !u(t));
250
+ }, r = (t) => {
251
+ a(t, !u(t));
252
+ }, o = () => {
253
+ $.value[s] = {};
254
+ }, f = (t) => {
255
+ t.key === "Escape" && (l(e.id, !1), p());
256
+ }, g = (t) => {
257
+ if (!e) return;
258
+ const v = t.target, [h] = Object.keys($.value[s]).filter((X) => $.value[s][X] === !0), O = document.getElementById(h), F = document.querySelector(`[aria-controls="${h}"]`), R = v.getAttribute("aria-controls") === h || F?.contains(t.target);
259
+ O && !O.contains(v) && !R && (l(e.id, !1), p());
260
+ }, b = () => {
261
+ e && (T.value = setTimeout(() => {
262
+ l(e.id, !1), p();
263
+ }, G));
264
+ }, y = () => {
265
+ e && e.mouseOverToggle === !0 && (Z.value = e.id, T.value = setTimeout(() => {
266
+ N();
267
+ }, G));
268
+ }, V = () => {
269
+ e && e.mouseOverToggle === !0 && (Z.value = null, clearTimeout(T.value), T.value = setTimeout(() => {
270
+ Z.value !== e.id && (l(e.id, !1), p());
271
+ }, G));
272
+ }, K = (t) => {
273
+ if (!e) return;
274
+ const { relatedTarget: v } = t;
275
+ if (!v || v.getAttribute("aria-controls") === e.id)
276
+ return;
277
+ const h = document.getElementById(e.id);
278
+ h && h.contains(v) || (clearTimeout(T.value), T.value = setTimeout(() => {
279
+ e.openSingle ? a(e.id, !1) : l(e.id, !1), p();
280
+ }, G));
281
+ }, Q = () => {
282
+ e && (e.outsideClickClose && (document.addEventListener("click", g), document.addEventListener("touchend", g)), e.escapeKeyClose && document.addEventListener("keydown", f));
283
+ }, p = () => {
284
+ document.removeEventListener("click", g), document.removeEventListener("touchend", g), document.removeEventListener("keydown", f), document.removeEventListener("scroll", b);
285
+ }, S = (t) => {
286
+ e && (t?.preventDefault(), clearTimeout(T.value), Q());
287
+ }, q = (t) => {
288
+ e && (S(t), e.openSingle ? r(e.id) : c(e.id));
289
+ }, N = (t) => {
290
+ e && (S(t), e.openSingle ? a(e.id, !0) : l(e.id, !0));
291
+ };
292
+ return se(() => {
293
+ $.value[s] || o();
294
+ }), J(() => {
295
+ p();
296
+ }), {
297
+ state: $,
298
+ timeout: T,
299
+ toggle: c,
300
+ toggleSingle: r,
301
+ setCollapsed: l,
302
+ setSingleCollapsed: a,
303
+ isCollapsed: u,
304
+ reset: o,
305
+ onMouseEnter: y,
306
+ onMouseLeave: V,
307
+ focusChange: K,
308
+ onClickToggle: q,
309
+ onClickOpen: N
310
+ };
311
+ }
312
+ const Pe = ["data-toggle", "aria-label", "aria-expanded", "aria-controls"], ee = /* @__PURE__ */ E({
313
+ __name: "CollapsePanel",
314
+ props: {
315
+ className: {},
316
+ id: {},
317
+ group: { default: void 0 },
318
+ blurClose: { type: Boolean, default: !1 },
319
+ openSingle: { type: Boolean, default: !1 },
320
+ mouseOverToggle: { type: Boolean, default: !1 },
321
+ outsideClickClose: { type: Boolean, default: !1 },
322
+ escapeKeyClose: { type: Boolean, default: !1 },
323
+ toggleAttrs: { default: void 0 }
324
+ },
325
+ setup(e) {
326
+ const s = e, { isCollapsed: l, onMouseEnter: a, onMouseLeave: u, onClickToggle: c, onClickOpen: r, focusChange: o } = Je(s), f = le(() => l(s.id));
327
+ return (g, b) => (d(), m("div", {
328
+ onMouseenter: b[1] || (b[1] = //@ts-ignore
329
+ (...y) => n(a) && n(a)(...y)),
330
+ onMouseleave: b[2] || (b[2] = //@ts-ignore
331
+ (...y) => n(u) && n(u)(...y)),
332
+ onFocusout: b[3] || (b[3] = //@ts-ignore
333
+ (...y) => n(o) && n(o)(...y))
334
+ }, [
335
+ x(g.$slots, "toggle", W(ae({
336
+ open: f.value,
337
+ ariaLabel: f.value ? "Close panel" : "Open panel",
338
+ ariaExpanded: f.value,
339
+ ariaControls: e.id,
340
+ onClickToggle: n(c),
341
+ onClickOpen: n(r),
342
+ focusChange: n(o),
343
+ onClick: n(c)
344
+ })), () => [
345
+ i("button", P({
346
+ "data-toggle": e.id,
347
+ "aria-label": f.value ? "Close panel" : "Open panel",
348
+ "aria-expanded": f.value,
349
+ "aria-controls": e.id
350
+ }, e.toggleAttrs, {
351
+ onClick: b[0] || (b[0] = me(
352
+ //@ts-ignore
353
+ (...y) => n(c) && n(c)(...y),
354
+ ["prevent"]
355
+ ))
356
+ }), null, 16, Pe)
357
+ ]),
358
+ x(g.$slots, "default", W(ae({ id: e.id, open: f.value, onClickToggle: n(c), focusChange: n(o), hidden: !f.value })))
359
+ ], 32));
360
+ }
361
+ }), ea = ["aria-controls", "aria-expanded", "aria-label", "onClick"], aa = { class: "icon" }, ta = ["id", "hidden"], na = /* @__PURE__ */ E({
362
+ __name: "NavbarBurger",
363
+ props: {
364
+ mobileNav: {},
365
+ collapseGroup: {}
366
+ },
367
+ setup(e) {
368
+ return (s, l) => (d(), k(n(ee), {
369
+ id: "mobile-nav",
370
+ group: e.collapseGroup,
371
+ "outside-click-close": "",
372
+ "escape-key-close": "",
373
+ "blur-close": "",
374
+ "open-single": ""
375
+ }, {
376
+ toggle: M((a) => [
377
+ i("button", {
378
+ class: j(["phila-navbar-burger phila-button icon-button", { "phila-navbar-item-flyout-active": a.open }]),
379
+ "aria-controls": a.ariaControls,
380
+ "aria-expanded": a.open,
381
+ "aria-label": `${a.open ? "Close" : "Open"} mobile navigation panel`,
382
+ onClick: a.onClick
383
+ }, [
384
+ i("span", aa, [
385
+ w(n(A), {
386
+ icon: a.open ? n(re) : n(Le)
387
+ }, null, 8, ["icon"])
388
+ ])
389
+ ], 10, ea)
390
+ ]),
391
+ default: M((a) => [
392
+ i("div", {
393
+ id: a.id,
394
+ class: "phila-mobile-nav",
395
+ hidden: !a.open
396
+ }, [
397
+ x(s.$slots, "mobile-nav", {}, () => [
398
+ (d(), k(U(e.mobileNav)))
399
+ ])
400
+ ], 8, ta)
401
+ ]),
402
+ _: 3
403
+ }, 8, ["group"]));
404
+ }
405
+ }), ia = ["href"], sa = ["href", "aria-controls", "aria-expanded", "onKeypress", "onTouchend", "onClick"], la = ["id", "hidden"], oa = {
406
+ key: 0,
407
+ class: "content nav-flyout has-background-ghost-gray px-6 py-4",
408
+ tabindex: "-1"
409
+ }, ra = {
410
+ class: "is-flex is-flex-column is-flex-wrap-wrap",
411
+ style: { gap: "var(--spacing-4xl)" }
412
+ }, ca = ["href"], da = /* @__PURE__ */ E({
413
+ __name: "NavbarLinks",
414
+ props: {
415
+ links: {},
416
+ collapseGroup: {}
417
+ },
418
+ setup(e) {
419
+ const s = (a) => !!(a.subLinks || a.subNav), l = (a) => `main-nav-${a.text.split(" ").join("-").toLowerCase().replace(/[^a-z0-9-]/g, "")}`;
420
+ return (a, u) => (d(!0), m(I, null, te(e.links, (c, r) => (d(), m(I, null, [
421
+ s(c) ? (d(), k(n(ee), {
422
+ id: l(c),
423
+ key: `collapse-${r}`,
424
+ group: e.collapseGroup,
425
+ "outside-click-close": "",
426
+ "escape-key-close": "",
427
+ "blur-close": "",
428
+ "mouse-over-toggle": "",
429
+ "open-single": "",
430
+ class: "phila-navbar-link-list-item"
431
+ }, {
432
+ toggle: M((o) => [
433
+ i("a", {
434
+ href: c.href,
435
+ class: j(["phila-navbar-link px-4", { "phila-navbar-item-flyout-active": o.open }]),
436
+ "aria-controls": o.ariaControls,
437
+ "aria-expanded": o.open,
438
+ tabindex: "0",
439
+ onKeypress: pe(o.onClick, ["enter"]),
440
+ onTouchend: o.onClick,
441
+ onClick: o.onClick
442
+ }, [
443
+ z(H(c.text) + " ", 1),
444
+ w(n(A), {
445
+ class: "ml-1",
446
+ icon: o.open ? n(ce) : n(de)
447
+ }, null, 8, ["icon"])
448
+ ], 42, sa)
449
+ ]),
450
+ default: M((o) => [
451
+ (d(), m("div", {
452
+ id: o.id,
453
+ key: c.text,
454
+ hidden: !o.open
455
+ }, [
456
+ c.subLinks ? (d(), m("div", oa, [
457
+ i("ul", ra, [
458
+ (d(!0), m(I, null, te(c.subLinks, (f) => (d(), m("li", {
459
+ key: f.text,
460
+ class: "sub-nav-link is-flex is-align-center",
461
+ style: { width: "150px" }
462
+ }, [
463
+ i("a", {
464
+ href: f.href,
465
+ class: "has-text-link has-text-weight-medium",
466
+ tabindex: "0"
467
+ }, H(f.text), 9, ca)
468
+ ]))), 128))
469
+ ])
470
+ ])) : (d(), k(U(c.subNav), { key: 1 }))
471
+ ], 8, la))
472
+ ]),
473
+ _: 2
474
+ }, 1032, ["id", "group"])) : (d(), m("div", {
475
+ key: `link-${r}`,
476
+ class: "phila-navbar-link-list-item"
477
+ }, [
478
+ i("a", {
479
+ href: c.href,
480
+ class: "phila-navbar-link px-4",
481
+ tabindex: "0"
482
+ }, H(c.text), 9, ia)
483
+ ]))
484
+ ], 64))), 256));
485
+ }
486
+ }), ua = {
487
+ href: "/",
488
+ class: "phila-navbar-item phila-navbar-brand-logo",
489
+ tabindex: "0"
490
+ }, va = ["src", "alt"], fa = /* @__PURE__ */ E({
491
+ inheritAttrs: !1,
492
+ __name: "NavbarBrandLogo",
493
+ props: {
494
+ src: {},
495
+ href: {},
496
+ altText: {}
497
+ },
498
+ setup(e) {
499
+ const s = he();
500
+ return (l, a) => (d(), m("a", ua, [
501
+ i("img", P({
502
+ src: e.src,
503
+ alt: e.altText,
504
+ class: "phila-navbar-logo",
505
+ width: "150"
506
+ }, n(s)), null, 16, va)
507
+ ]));
508
+ }
509
+ }), ma = { class: "pr-4" }, pa = ["aria-controls", "aria-expanded", "aria-label", "onClick"], ha = { class: "icon" }, ga = ["id", "hidden"], ba = /* @__PURE__ */ E({
510
+ __name: "NavbarSearch",
511
+ props: {
512
+ search: {},
513
+ collapseGroup: {}
514
+ },
515
+ setup(e) {
516
+ return (s, l) => (d(), k(n(ee), {
517
+ id: "navbar-search",
518
+ group: e.collapseGroup,
519
+ "outside-click-close": "",
520
+ "escape-key-close": "",
521
+ "blur-close": "",
522
+ "open-single": ""
523
+ }, {
524
+ toggle: M((a) => [
525
+ i("div", ma, [
526
+ i("button", {
527
+ class: j(["phila-button phila-button--primary icon-button is-small", { "phila-navbar-item-flyout-active": a.open }]),
528
+ "aria-controls": a.ariaControls,
529
+ "aria-expanded": a.open,
530
+ "aria-label": `${a.open ? "Close" : "Open"} search panel`,
531
+ onClick: a.onClick
532
+ }, [
533
+ i("span", ha, [
534
+ w(n(A), {
535
+ icon: a.open ? n(re) : n(Ce)
536
+ }, null, 8, ["icon"])
537
+ ])
538
+ ], 10, pa)
539
+ ])
540
+ ]),
541
+ default: M((a) => [
542
+ i("div", {
543
+ id: a.id,
544
+ class: "nav-flyout is-12",
545
+ hidden: !a.open
546
+ }, [
547
+ x(s.$slots, "default", {}, () => [
548
+ e.search && a.open ? (d(), k(U(e.search), { key: 0 })) : _("", !0)
549
+ ])
550
+ ], 8, ga)
551
+ ]),
552
+ _: 3
553
+ }, 8, ["group"]));
554
+ }
555
+ });
556
+ function ka(e, s) {
557
+ let l;
558
+ return (...a) => {
559
+ l !== void 0 && window.clearTimeout(l), l = window.setTimeout(() => {
560
+ e(...a);
561
+ }, s);
562
+ };
563
+ }
564
+ const ya = { class: "phila-navbar-brand" }, xa = { class: "phila-navbar-item phila-navbar-brand-link hidden-tablet" }, Ca = {
565
+ key: 0,
566
+ class: "content"
567
+ }, _a = ["href"], wa = { class: "phila-navbar-item phila-navbar-list is-flex is-align-center is-justify-space-between content has-text-label-default hidden-tablet" }, Ba = { class: "phila-navbar-search" }, ne = "5rem", La = /* @__PURE__ */ E({
568
+ __name: "index",
569
+ props: {
570
+ id: {},
571
+ sticky: { type: Boolean },
572
+ navbarBrand: {},
573
+ mobileNav: {},
574
+ collapseGroup: {},
575
+ search: {},
576
+ links: { default: () => [{ text: "Home", href: "#" }] }
577
+ },
578
+ setup(e) {
579
+ const s = e, { state: l } = ue(), a = ge("navBarElement"), u = C(ne), c = C(0), r = ka(() => {
580
+ const o = (a.value?.offsetTop || 0) + (a.value?.offsetHeight || 0);
581
+ u.value = !s.sticky || window.innerWidth < 1024 ? o + "px" : ne, c.value = o;
582
+ }, 100);
583
+ return be(() => l.value, r, { deep: !0, immediate: !0 }), ke(() => {
584
+ window.addEventListener("resize", r);
585
+ }), J(() => {
586
+ window.removeEventListener("resize", r);
587
+ }), (o, f) => (d(), m("nav", {
588
+ ref_key: "navBarElement",
589
+ ref: a,
590
+ class: j(["phila-navbar has-background-primary", { "is-sticky-desktop": e.sticky }]),
591
+ "aria-label": "Main navigation",
592
+ style: ye(`--nav-height:${u.value};--nav-bottom:${c.value}px`)
593
+ }, [
594
+ x(o.$slots, "navbar-burger", {}, () => [
595
+ e.mobileNav ? (d(), k(na, {
596
+ key: 0,
597
+ "mobile-nav": e.mobileNav,
598
+ "collapse-group": e.id
599
+ }, null, 8, ["mobile-nav", "collapse-group"])) : _("", !0)
600
+ ], !0),
601
+ i("div", ya, [
602
+ x(o.$slots, "navbar-logo", {}, () => [
603
+ e.navbarBrand?.brandingImage ? (d(), k(fa, W(P({ key: 0 }, e.navbarBrand.brandingImage)), null, 16)) : _("", !0)
604
+ ], !0),
605
+ i("div", xa, [
606
+ x(o.$slots, "navbar-brand-link", {}, () => [
607
+ e.navbarBrand?.brandingLink ? (d(), m("div", Ca, [
608
+ i("a", {
609
+ tabindex: "0",
610
+ href: e.navbarBrand.brandingLink.href,
611
+ class: "has-text-underline"
612
+ }, H(e.navbarBrand.brandingLink.text), 9, _a)
613
+ ])) : _("", !0)
614
+ ], !0)
615
+ ])
616
+ ]),
617
+ i("div", wa, [
618
+ x(o.$slots, "navbar-links", {}, () => [
619
+ e.links ? (d(), k(da, {
620
+ key: 0,
621
+ links: e.links,
622
+ "collapse-group": e.id
623
+ }, null, 8, ["links", "collapse-group"])) : _("", !0)
624
+ ], !0)
625
+ ]),
626
+ i("div", Ba, [
627
+ x(o.$slots, "navbar-search", {}, () => [
628
+ e.search ? (d(), k(ba, {
629
+ key: 0,
630
+ search: e.search,
631
+ "collapse-group": e.id
632
+ }, null, 8, ["search", "collapse-group"])) : _("", !0)
633
+ ], !0)
634
+ ])
635
+ ], 6));
636
+ }
637
+ }), $a = /* @__PURE__ */ ve(La, [["__scopeId", "data-v-985eaeb2"]]), Ea = /* @__PURE__ */ E({
638
+ __name: "AppHeader",
639
+ props: {
640
+ showTrustedSite: { type: Boolean, default: !0 },
641
+ translations: { default: void 0 },
642
+ className: {},
643
+ id: { default: "main-nav" },
644
+ sticky: { type: Boolean, default: !0 },
645
+ navbarBrand: { default: void 0 },
646
+ mobileNav: { default: void 0 },
647
+ collapseGroup: {},
648
+ search: { default: void 0 },
649
+ links: { default: void 0 }
650
+ },
651
+ setup(e) {
652
+ return (s, l) => (d(), m(I, null, [
653
+ e.showTrustedSite ? (d(), k(We, { key: 0 }, {
654
+ translation: M(() => [
655
+ x(s.$slots, "translations", {}, () => [
656
+ e.translations ? (d(), k(U(e.translations), { key: 0 })) : _("", !0)
657
+ ])
658
+ ]),
659
+ _: 3
660
+ })) : _("", !0),
661
+ w($a, {
662
+ id: e.id,
663
+ sticky: e.sticky,
664
+ "mobile-nav": e.mobileNav,
665
+ links: e.links,
666
+ "navbar-brand": e.navbarBrand,
667
+ search: e.search
668
+ }, null, 8, ["id", "sticky", "mobile-nav", "links", "navbar-brand", "search"])
669
+ ], 64));
670
+ }
671
+ });
672
+ export {
673
+ Ea as AppHeader
674
+ };