@uvalib/web-components 0.0.0-stage → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +172 -0
- package/README.md +1164 -2
- package/bin/install-skill.mjs +139 -0
- package/dist/base/UvalibElement.d.ts +21 -0
- package/dist/base/UvalibElement.js +68 -0
- package/dist/base/UvalibElement.js.map +1 -0
- package/dist/base/analytics.d.ts +44 -0
- package/dist/base/analytics.js +59 -0
- package/dist/base/analytics.js.map +1 -0
- package/dist/base/color-scheme.d.ts +93 -0
- package/dist/base/color-scheme.js +267 -0
- package/dist/base/color-scheme.js.map +1 -0
- package/dist/base/define.d.ts +2 -0
- package/dist/base/define.js +6 -0
- package/dist/base/define.js.map +1 -0
- package/dist/base/heading-level.d.ts +12 -0
- package/dist/base/heading-level.js +52 -0
- package/dist/base/heading-level.js.map +1 -0
- package/dist/base/light-dom-styles.d.ts +18 -0
- package/dist/base/light-dom-styles.js +134 -0
- package/dist/base/light-dom-styles.js.map +1 -0
- package/dist/base.css +30 -0
- package/dist/base.d.ts +5 -0
- package/dist/base.js +5 -0
- package/dist/base.js.map +1 -0
- package/dist/components/bento-box/ArticlesSection.d.ts +19 -0
- package/dist/components/bento-box/ArticlesSection.js +22 -0
- package/dist/components/bento-box/ArticlesSection.js.map +1 -0
- package/dist/components/bento-box/BentoBox.d.ts +85 -0
- package/dist/components/bento-box/BentoBox.js +366 -0
- package/dist/components/bento-box/BentoBox.js.map +1 -0
- package/dist/components/bento-box/BentoSection.d.ts +115 -0
- package/dist/components/bento-box/BentoSection.js +486 -0
- package/dist/components/bento-box/BentoSection.js.map +1 -0
- package/dist/components/bento-box/CatalogSection.d.ts +18 -0
- package/dist/components/bento-box/CatalogSection.js +19 -0
- package/dist/components/bento-box/CatalogSection.js.map +1 -0
- package/dist/components/bento-box/LibGuidesSection.d.ts +24 -0
- package/dist/components/bento-box/LibGuidesSection.js +73 -0
- package/dist/components/bento-box/LibGuidesSection.js.map +1 -0
- package/dist/components/bento-box/VirgoSection.d.ts +19 -0
- package/dist/components/bento-box/VirgoSection.js +58 -0
- package/dist/components/bento-box/VirgoSection.js.map +1 -0
- package/dist/components/bento-box/WebsiteSection.d.ts +25 -0
- package/dist/components/bento-box/WebsiteSection.js +40 -0
- package/dist/components/bento-box/WebsiteSection.js.map +1 -0
- package/dist/components/bento-box/bento-box.d.ts +1 -0
- package/dist/components/bento-box/bento-box.js +13 -0
- package/dist/components/bento-box/bento-box.js.map +1 -0
- package/dist/components/bento-box/bento-data.d.ts +147 -0
- package/dist/components/bento-box/bento-data.js +422 -0
- package/dist/components/bento-box/bento-data.js.map +1 -0
- package/dist/components/events-section/EventsSection.d.ts +91 -0
- package/dist/components/events-section/EventsSection.js +435 -0
- package/dist/components/events-section/EventsSection.js.map +1 -0
- package/dist/components/events-section/events-data.d.ts +90 -0
- package/dist/components/events-section/events-data.js +174 -0
- package/dist/components/events-section/events-data.js.map +1 -0
- package/dist/components/events-section/events-section.d.ts +1 -0
- package/dist/components/events-section/events-section.js +4 -0
- package/dist/components/events-section/events-section.js.map +1 -0
- package/dist/components/library-hours/hours-data.d.ts +104 -0
- package/dist/components/library-hours/hours-data.js +267 -0
- package/dist/components/library-hours/hours-data.js.map +1 -0
- package/dist/components/library-hours-setup/LibraryHoursSetup.d.ts +21 -0
- package/dist/components/library-hours-setup/LibraryHoursSetup.js +59 -0
- package/dist/components/library-hours-setup/LibraryHoursSetup.js.map +1 -0
- package/dist/components/library-hours-setup/library-hours-setup.d.ts +1 -0
- package/dist/components/library-hours-setup/library-hours-setup.js +5 -0
- package/dist/components/library-hours-setup/library-hours-setup.js.map +1 -0
- package/dist/components/library-weekly-hours/LibraryWeeklyHours.d.ts +107 -0
- package/dist/components/library-weekly-hours/LibraryWeeklyHours.js +502 -0
- package/dist/components/library-weekly-hours/LibraryWeeklyHours.js.map +1 -0
- package/dist/components/library-weekly-hours/library-weekly-hours.d.ts +1 -0
- package/dist/components/library-weekly-hours/library-weekly-hours.js +4 -0
- package/dist/components/library-weekly-hours/library-weekly-hours.js.map +1 -0
- package/dist/components/link.d.ts +2 -0
- package/dist/components/link.js +7 -0
- package/dist/components/link.js.map +1 -0
- package/dist/components/site-analytics/SiteAnalytics.d.ts +44 -0
- package/dist/components/site-analytics/SiteAnalytics.js +161 -0
- package/dist/components/site-analytics/SiteAnalytics.js.map +1 -0
- package/dist/components/site-analytics/SiteAnalyticsMixin.d.ts +8 -0
- package/dist/components/site-analytics/SiteAnalyticsMixin.js +22 -0
- package/dist/components/site-analytics/SiteAnalyticsMixin.js.map +1 -0
- package/dist/components/site-analytics/site-analytics.d.ts +1 -0
- package/dist/components/site-analytics/site-analytics.js +4 -0
- package/dist/components/site-analytics/site-analytics.js.map +1 -0
- package/dist/components/site-footer/SiteFooter.d.ts +34 -0
- package/dist/components/site-footer/SiteFooter.js +275 -0
- package/dist/components/site-footer/SiteFooter.js.map +1 -0
- package/dist/components/site-footer/icons.d.ts +4 -0
- package/dist/components/site-footer/icons.js +7 -0
- package/dist/components/site-footer/icons.js.map +1 -0
- package/dist/components/site-footer/site-footer.d.ts +1 -0
- package/dist/components/site-footer/site-footer.js +4 -0
- package/dist/components/site-footer/site-footer.js.map +1 -0
- package/dist/components/site-header/SiteHeader.d.ts +154 -0
- package/dist/components/site-header/SiteHeader.js +845 -0
- package/dist/components/site-header/SiteHeader.js.map +1 -0
- package/dist/components/site-header/site-header.d.ts +1 -0
- package/dist/components/site-header/site-header.js +12 -0
- package/dist/components/site-header/site-header.js.map +1 -0
- package/dist/components/site-hours-section/SiteHoursSection.d.ts +63 -0
- package/dist/components/site-hours-section/SiteHoursSection.js +243 -0
- package/dist/components/site-hours-section/SiteHoursSection.js.map +1 -0
- package/dist/components/site-hours-section/site-hours-section.d.ts +1 -0
- package/dist/components/site-hours-section/site-hours-section.js +4 -0
- package/dist/components/site-hours-section/site-hours-section.js.map +1 -0
- package/dist/components/site-main-nav/SiteMainNav.d.ts +136 -0
- package/dist/components/site-main-nav/SiteMainNav.js +678 -0
- package/dist/components/site-main-nav/SiteMainNav.js.map +1 -0
- package/dist/components/site-main-nav/main-nav-data.d.ts +5 -0
- package/dist/components/site-main-nav/main-nav-data.js +90 -0
- package/dist/components/site-main-nav/main-nav-data.js.map +1 -0
- package/dist/components/site-main-nav/main-nav-items.d.ts +49 -0
- package/dist/components/site-main-nav/main-nav-items.js +138 -0
- package/dist/components/site-main-nav/main-nav-items.js.map +1 -0
- package/dist/components/site-main-nav/site-main-nav.d.ts +1 -0
- package/dist/components/site-main-nav/site-main-nav.js +4 -0
- package/dist/components/site-main-nav/site-main-nav.js.map +1 -0
- package/dist/components/site-page/SitePage.d.ts +145 -0
- package/dist/components/site-page/SitePage.js +480 -0
- package/dist/components/site-page/SitePage.js.map +1 -0
- package/dist/components/site-page/alerts.d.ts +24 -0
- package/dist/components/site-page/alerts.js +78 -0
- package/dist/components/site-page/alerts.js.map +1 -0
- package/dist/components/site-page/site-page.d.ts +1 -0
- package/dist/components/site-page/site-page.js +7 -0
- package/dist/components/site-page/site-page.js.map +1 -0
- package/dist/components/site-style/SiteStyle.d.ts +37 -0
- package/dist/components/site-style/SiteStyle.js +76 -0
- package/dist/components/site-style/SiteStyle.js.map +1 -0
- package/dist/components/site-style/site-style.d.ts +1 -0
- package/dist/components/site-style/site-style.js +4 -0
- package/dist/components/site-style/site-style.js.map +1 -0
- package/dist/components/uvalib-analytics/UvalibAnalytics.d.ts +10 -0
- package/dist/components/uvalib-analytics/UvalibAnalytics.js +11 -0
- package/dist/components/uvalib-analytics/UvalibAnalytics.js.map +1 -0
- package/dist/components/uvalib-analytics/UvalibAnalyticsMixin.d.ts +13 -0
- package/dist/components/uvalib-analytics/UvalibAnalyticsMixin.js +25 -0
- package/dist/components/uvalib-analytics/UvalibAnalyticsMixin.js.map +1 -0
- package/dist/components/uvalib-analytics/uvalib-analytics.d.ts +1 -0
- package/dist/components/uvalib-analytics/uvalib-analytics.js +4 -0
- package/dist/components/uvalib-analytics/uvalib-analytics.js.map +1 -0
- package/dist/components/uvalib-date-range/UvalibDateRange.d.ts +46 -0
- package/dist/components/uvalib-date-range/UvalibDateRange.js +339 -0
- package/dist/components/uvalib-date-range/UvalibDateRange.js.map +1 -0
- package/dist/components/uvalib-date-range/uvalib-date-range.d.ts +1 -0
- package/dist/components/uvalib-date-range/uvalib-date-range.js +4 -0
- package/dist/components/uvalib-date-range/uvalib-date-range.js.map +1 -0
- package/dist/components/uvalib-filter/UvalibFilter.d.ts +73 -0
- package/dist/components/uvalib-filter/UvalibFilter.js +279 -0
- package/dist/components/uvalib-filter/UvalibFilter.js.map +1 -0
- package/dist/components/uvalib-filter/uvalib-filter.d.ts +1 -0
- package/dist/components/uvalib-filter/uvalib-filter.js +4 -0
- package/dist/components/uvalib-filter/uvalib-filter.js.map +1 -0
- package/dist/custom-elements.json +15178 -0
- package/dist/data/fetch-json.d.ts +28 -0
- package/dist/data/fetch-json.js +43 -0
- package/dist/data/fetch-json.js.map +1 -0
- package/dist/data/new-york.d.ts +5 -0
- package/dist/data/new-york.js +23 -0
- package/dist/data/new-york.js.map +1 -0
- package/dist/data/sites.d.ts +12 -0
- package/dist/data/sites.js +89 -0
- package/dist/data/sites.js.map +1 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/styles/accessible.d.ts +1 -0
- package/dist/styles/accessible.js +37 -0
- package/dist/styles/accessible.js.map +1 -0
- package/dist/styles/base.d.ts +2 -0
- package/dist/styles/base.js +41 -0
- package/dist/styles/base.js.map +1 -0
- package/dist/styles/color-scheme.d.ts +1 -0
- package/dist/styles/color-scheme.js +81 -0
- package/dist/styles/color-scheme.js.map +1 -0
- package/dist/styles/tokens.d.ts +1 -0
- package/dist/styles/tokens.js +85 -0
- package/dist/styles/tokens.js.map +1 -0
- package/dist/styles/w3-subset.d.ts +1 -0
- package/dist/styles/w3-subset.js +33 -0
- package/dist/styles/w3-subset.js.map +1 -0
- package/dist/tokens.css +152 -0
- package/dist-cdn/base.css +30 -0
- package/dist-cdn/bento-box.js +1035 -0
- package/dist-cdn/bento-box.js.map +1 -0
- package/dist-cdn/chunks/SiteAnalytics-T1Wx3lsb.js +174 -0
- package/dist-cdn/chunks/SiteAnalytics-T1Wx3lsb.js.map +1 -0
- package/dist-cdn/chunks/UvalibElement-BnI-eRRR.js +695 -0
- package/dist-cdn/chunks/UvalibElement-BnI-eRRR.js.map +1 -0
- package/dist-cdn/chunks/accessible-GqhVn5_H.js +40 -0
- package/dist-cdn/chunks/accessible-GqhVn5_H.js.map +1 -0
- package/dist-cdn/chunks/analytics-C8D8n_wt.js +55 -0
- package/dist-cdn/chunks/analytics-C8D8n_wt.js.map +1 -0
- package/dist-cdn/chunks/base-DCGd2Oii.js +117 -0
- package/dist-cdn/chunks/base-DCGd2Oii.js.map +1 -0
- package/dist-cdn/chunks/fetch-json-Cyqv-gLU.js +25 -0
- package/dist-cdn/chunks/fetch-json-Cyqv-gLU.js.map +1 -0
- package/dist-cdn/chunks/heading-level-DIuNS44-.js +31 -0
- package/dist-cdn/chunks/heading-level-DIuNS44-.js.map +1 -0
- package/dist-cdn/chunks/hours-data-Bw6vkIw7.js +181 -0
- package/dist-cdn/chunks/hours-data-Bw6vkIw7.js.map +1 -0
- package/dist-cdn/chunks/library-weekly-hours-ByQ8ugxh.js +346 -0
- package/dist-cdn/chunks/library-weekly-hours-ByQ8ugxh.js.map +1 -0
- package/dist-cdn/chunks/link-DbJSwj16.js +7 -0
- package/dist-cdn/chunks/link-DbJSwj16.js.map +1 -0
- package/dist-cdn/chunks/new-york-DkcnqvJ4.js +18 -0
- package/dist-cdn/chunks/new-york-DkcnqvJ4.js.map +1 -0
- package/dist-cdn/chunks/repeat-CIFUYkyh.js +101 -0
- package/dist-cdn/chunks/repeat-CIFUYkyh.js.map +1 -0
- package/dist-cdn/chunks/site-header-BwDkZ2LL.js +802 -0
- package/dist-cdn/chunks/site-header-BwDkZ2LL.js.map +1 -0
- package/dist-cdn/chunks/site-main-nav-BLAAunnr.js +605 -0
- package/dist-cdn/chunks/site-main-nav-BLAAunnr.js.map +1 -0
- package/dist-cdn/chunks/static-html-1mTAG6nS.js +22 -0
- package/dist-cdn/chunks/static-html-1mTAG6nS.js.map +1 -0
- package/dist-cdn/custom-elements.json +15178 -0
- package/dist-cdn/events-section.js +401 -0
- package/dist-cdn/events-section.js.map +1 -0
- package/dist-cdn/library-hours-setup.js +28 -0
- package/dist-cdn/library-hours-setup.js.map +1 -0
- package/dist-cdn/library-weekly-hours.js +1 -0
- package/dist-cdn/manifest.json +23 -0
- package/dist-cdn/site-analytics.js +6 -0
- package/dist-cdn/site-analytics.js.map +1 -0
- package/dist-cdn/site-footer.js +267 -0
- package/dist-cdn/site-footer.js.map +1 -0
- package/dist-cdn/site-header.js +1 -0
- package/dist-cdn/site-hours-section.js +145 -0
- package/dist-cdn/site-hours-section.js.map +1 -0
- package/dist-cdn/site-main-nav.js +1 -0
- package/dist-cdn/site-page.js +317 -0
- package/dist-cdn/site-page.js.map +1 -0
- package/dist-cdn/site-style.js +42 -0
- package/dist-cdn/site-style.js.map +1 -0
- package/dist-cdn/skills/uvalib-web-components/SKILL.md +276 -0
- package/dist-cdn/skills/uvalib-web-components/reference/components.md +631 -0
- package/dist-cdn/skills/uvalib-web-components/reference/migration.md +74 -0
- package/dist-cdn/skills/uvalib-web-components/reference/snippets.md +147 -0
- package/dist-cdn/tokens.css +152 -0
- package/dist-cdn/uvalib-analytics.js +6 -0
- package/dist-cdn/uvalib-analytics.js.map +1 -0
- package/dist-cdn/uvalib-date-range.js +262 -0
- package/dist-cdn/uvalib-date-range.js.map +1 -0
- package/dist-cdn/uvalib-filter.js +184 -0
- package/dist-cdn/uvalib-filter.js.map +1 -0
- package/package.json +152 -4
- package/skills/uvalib-web-components/SKILL.md +276 -0
- package/skills/uvalib-web-components/reference/components.md +631 -0
- package/skills/uvalib-web-components/reference/migration.md +74 -0
- package/skills/uvalib-web-components/reference/snippets.md +147 -0
|
@@ -0,0 +1,605 @@
|
|
|
1
|
+
import { a as e, f as t, i as n, l as r, m as i, n as a, o, p as s, r as c, t as l } from "./UvalibElement-BnI-eRRR.js";
|
|
2
|
+
import { i as u } from "./analytics-C8D8n_wt.js";
|
|
3
|
+
import { t as d } from "./accessible-GqhVn5_H.js";
|
|
4
|
+
import { t as f } from "./link-DbJSwj16.js";
|
|
5
|
+
// node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directives/if-defined.js
|
|
6
|
+
var p = (e) => e ?? o, m = (e) => typeof e == "string" ? e.replace(/\s+/g, " ").trim() : "";
|
|
7
|
+
function h(e) {
|
|
8
|
+
let t = {
|
|
9
|
+
items: [],
|
|
10
|
+
invalid: !1,
|
|
11
|
+
flattened: !1
|
|
12
|
+
};
|
|
13
|
+
if (!Array.isArray(e)) return t.invalid = e != null, t;
|
|
14
|
+
let n = (e, r, i) => {
|
|
15
|
+
for (let a of e) {
|
|
16
|
+
let e = a ?? {}, o = m(e.label), s = m(e.href), c = Array.isArray(e.items) && e.items.length ? e.items : null;
|
|
17
|
+
c ? (t.flattened = !0, o && s && r.push({
|
|
18
|
+
label: o,
|
|
19
|
+
href: s
|
|
20
|
+
}), n(c, r, i + 1)) : o && s ? r.push({
|
|
21
|
+
label: o,
|
|
22
|
+
href: s
|
|
23
|
+
}) : t.invalid = !0;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
for (let r of e) {
|
|
27
|
+
let e = r ?? {}, i = m(e.label), a = m(e.href), o = Array.isArray(e.items) && e.items.length ? e.items : null;
|
|
28
|
+
if (!i) t.invalid = !0;
|
|
29
|
+
else if (o) {
|
|
30
|
+
let e = [];
|
|
31
|
+
n(o, e, 2), e.length ? t.items.push({
|
|
32
|
+
label: i,
|
|
33
|
+
items: e
|
|
34
|
+
}) : a ? t.items.push({
|
|
35
|
+
label: i,
|
|
36
|
+
href: a
|
|
37
|
+
}) : t.invalid = !0;
|
|
38
|
+
} else a ? t.items.push({
|
|
39
|
+
label: i,
|
|
40
|
+
href: a
|
|
41
|
+
}) : t.invalid = !0;
|
|
42
|
+
}
|
|
43
|
+
return t;
|
|
44
|
+
}
|
|
45
|
+
var g = (e) => (e.textContent ?? "").replace(/\s+/g, " ").trim();
|
|
46
|
+
function _(e) {
|
|
47
|
+
let t = e.localName === "ul" ? e : e.querySelector(":scope > ul") ?? void 0;
|
|
48
|
+
if (!t) return [{}];
|
|
49
|
+
let n = (e) => {
|
|
50
|
+
if (e.localName !== "li") return {};
|
|
51
|
+
let t = [...e.children], r = t.find((e) => e.localName === "ul"), i = t.find((e) => e.localName !== "ul");
|
|
52
|
+
if (!i) return {};
|
|
53
|
+
let a = g(i), o = i.localName === "a" ? i.getAttribute("href") : null;
|
|
54
|
+
return r ? {
|
|
55
|
+
label: a,
|
|
56
|
+
href: o,
|
|
57
|
+
items: [...r.children].map(n)
|
|
58
|
+
} : i.localName === "a" ? {
|
|
59
|
+
label: a,
|
|
60
|
+
href: o
|
|
61
|
+
} : { label: a };
|
|
62
|
+
};
|
|
63
|
+
return [...t.children].map(n);
|
|
64
|
+
}
|
|
65
|
+
var v = {
|
|
66
|
+
attempts: 2,
|
|
67
|
+
retryDelay: 1e3,
|
|
68
|
+
timeout: 1e4
|
|
69
|
+
};
|
|
70
|
+
async function y(e) {
|
|
71
|
+
let t, n = Math.max(1, v.attempts);
|
|
72
|
+
for (let r = 0; r < n; r++) {
|
|
73
|
+
r > 0 && await new Promise((e) => setTimeout(e, v.retryDelay));
|
|
74
|
+
try {
|
|
75
|
+
let t = await fetch(e, { signal: AbortSignal.timeout(v.timeout) });
|
|
76
|
+
if (!t.ok) throw Error(`${t.status} ${t.statusText} for ${e}`);
|
|
77
|
+
return await t.json();
|
|
78
|
+
} catch (e) {
|
|
79
|
+
t = e;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
throw t instanceof Error ? t : Error(String(t));
|
|
83
|
+
}
|
|
84
|
+
var b = /* @__PURE__ */ new Map();
|
|
85
|
+
function x(e) {
|
|
86
|
+
let t = b.get(e);
|
|
87
|
+
if (!t) {
|
|
88
|
+
let n = y(e).then((t) => {
|
|
89
|
+
let n = h(t);
|
|
90
|
+
if (!n.items.length) throw Error(`no valid main navigation entries in ${e}`);
|
|
91
|
+
return n;
|
|
92
|
+
});
|
|
93
|
+
b.set(e, t = n), n.catch(() => {
|
|
94
|
+
b.get(e) === n && b.delete(e);
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
return t;
|
|
98
|
+
}
|
|
99
|
+
// src/components/site-main-nav/main-nav-data.ts
|
|
100
|
+
var S = [
|
|
101
|
+
{
|
|
102
|
+
label: "About",
|
|
103
|
+
items: [
|
|
104
|
+
{
|
|
105
|
+
label: "About UVA Library",
|
|
106
|
+
href: "/about-uva-library"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
label: "News & announcements",
|
|
110
|
+
href: "https://library.virginia.edu/news/all?mtm_campaign=main-nav"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
label: "Plan a visit",
|
|
114
|
+
href: "/about-uva-library#visit"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
label: "Library Assessment",
|
|
118
|
+
href: "/assessment"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
label: "Staff directory",
|
|
122
|
+
href: "/staff"
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
label: "Using the Library",
|
|
128
|
+
items: [
|
|
129
|
+
{
|
|
130
|
+
label: "Search, borrow, request",
|
|
131
|
+
href: "/services"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
label: "Library spaces",
|
|
135
|
+
href: "/spaces"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
label: "Equipment & technology",
|
|
139
|
+
href: "/equipment-and-tech"
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
label: "Research & teaching support",
|
|
145
|
+
items: [
|
|
146
|
+
{
|
|
147
|
+
label: "Research & teaching support",
|
|
148
|
+
href: "/research-and-teaching"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
label: "Research support",
|
|
152
|
+
href: "/research-and-teaching/research"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
label: "Instruction assistance",
|
|
156
|
+
href: "/research-and-teaching/teach"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
label: "Writing & publication",
|
|
160
|
+
href: "/research-and-teaching/write"
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
label: "Get help",
|
|
166
|
+
items: [
|
|
167
|
+
{
|
|
168
|
+
label: "Get help",
|
|
169
|
+
href: "/help"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
label: "Ask a Librarian",
|
|
173
|
+
href: "/askalibrarian"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
label: "Accessibility services",
|
|
177
|
+
href: "/accessibility"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
label: "Subject specialists",
|
|
181
|
+
href: "https://guides.lib.virginia.edu/subjectlibrarians"
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
], C = 0, w = "main-nav", T = (e) => e instanceof Element && e.getAttribute("slot") === w, E = ["href", "slot"], D = "\n .toggle:focus-visible,\n .top-link:focus-visible,\n .panel a:focus-visible {\n outline: 3px solid var(--uva-color-focus, var(--uva-brand-orange, #e57200));\n outline-offset: -4px;\n }\n .toggle[aria-expanded='true']:focus-visible,\n .toggle:hover:focus-visible,\n .top-link:hover:focus-visible,\n .panel a:hover:focus-visible {\n outline-color: var(--uva-color-link, var(--uva-brand-blue, #232d4b));\n }\n", O = s(D), k = (e) => s(D.replace(/(^|,)\s*\./gm, `$1 ${e} .`));
|
|
186
|
+
function A(e, t) {
|
|
187
|
+
try {
|
|
188
|
+
let n = new URL(e, t);
|
|
189
|
+
return `${n.host.replace(/^www\./, "")}${n.pathname.replace(/\/+$/, "")}`;
|
|
190
|
+
} catch {
|
|
191
|
+
return null;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
var j = (e, t) => {
|
|
195
|
+
try {
|
|
196
|
+
return new URL(e, t).hash;
|
|
197
|
+
} catch {
|
|
198
|
+
return "";
|
|
199
|
+
}
|
|
200
|
+
}, M = class extends l {
|
|
201
|
+
constructor(...e) {
|
|
202
|
+
super(...e), this.label = "Main", this.rootLinkDomain = "https://www.library.virginia.edu", this.layout = "bar", this.slotItems = null, this.fetched = null, this.open = null, this.propItems = null, this.warned = /* @__PURE__ */ new Set(), this.idBase = `main-nav-${++C}`, this.onLocationChange = () => {
|
|
203
|
+
this.current || this.requestUpdate();
|
|
204
|
+
}, this.listeningLocation = !1, this.onOutsidePointer = (e) => {
|
|
205
|
+
let t = this.navEl;
|
|
206
|
+
t && !e.composedPath().includes(t) && this.setOpen(null);
|
|
207
|
+
}, this.listening = !1;
|
|
208
|
+
}
|
|
209
|
+
static {
|
|
210
|
+
this.styles = [d, t`
|
|
211
|
+
:host {
|
|
212
|
+
display: block;
|
|
213
|
+
font-family: var(--uva-font-family, franklin-gothic-urw, Arial, Helvetica, sans-serif);
|
|
214
|
+
font-size: 17px;
|
|
215
|
+
line-height: 1.5;
|
|
216
|
+
}
|
|
217
|
+
:host([hidden]) {
|
|
218
|
+
display: none;
|
|
219
|
+
}
|
|
220
|
+
ul {
|
|
221
|
+
list-style: none;
|
|
222
|
+
margin: 0;
|
|
223
|
+
padding: 0;
|
|
224
|
+
}
|
|
225
|
+
.panel[hidden] {
|
|
226
|
+
display: none;
|
|
227
|
+
}
|
|
228
|
+
.toggle,
|
|
229
|
+
.top-link {
|
|
230
|
+
display: flex;
|
|
231
|
+
align-items: center;
|
|
232
|
+
box-sizing: border-box;
|
|
233
|
+
margin: 0;
|
|
234
|
+
border: 0;
|
|
235
|
+
border-radius: 0;
|
|
236
|
+
background: transparent;
|
|
237
|
+
color: var(--uva-color-text, var(--uva-grey-darkest, #2b2b2b));
|
|
238
|
+
font: inherit;
|
|
239
|
+
font-weight: 500;
|
|
240
|
+
line-height: 1.5;
|
|
241
|
+
text-align: start;
|
|
242
|
+
text-decoration: none;
|
|
243
|
+
cursor: pointer;
|
|
244
|
+
}
|
|
245
|
+
/* Chevron: a rotated border box, turned over when expanded. */
|
|
246
|
+
.toggle::after {
|
|
247
|
+
content: '';
|
|
248
|
+
flex: none;
|
|
249
|
+
inline-size: 0.5em;
|
|
250
|
+
block-size: 0.5em;
|
|
251
|
+
margin-inline-start: 0.75em;
|
|
252
|
+
border-style: solid;
|
|
253
|
+
border-color: var(--uva-color-link, var(--uva-brand-blue, #232d4b));
|
|
254
|
+
border-width: 0 1px 1px 0;
|
|
255
|
+
transform: translateY(-0.15em) rotate(45deg);
|
|
256
|
+
}
|
|
257
|
+
.toggle[aria-expanded='true']::after {
|
|
258
|
+
transform: translateY(0.15em) rotate(-135deg);
|
|
259
|
+
}
|
|
260
|
+
/* Grey for hover and the open group only, never for focus: the orange focus ring
|
|
261
|
+
would fall below 3:1 against it. */
|
|
262
|
+
.toggle:hover,
|
|
263
|
+
.toggle[aria-expanded='true'],
|
|
264
|
+
.top-link:hover {
|
|
265
|
+
background-color: var(--uva-color-surface-hover, var(--uva-grey-100, #dadada));
|
|
266
|
+
color: var(--uva-color-link, var(--uva-brand-blue, #232d4b));
|
|
267
|
+
}
|
|
268
|
+
.panel a {
|
|
269
|
+
display: block;
|
|
270
|
+
color: var(--uva-color-link, var(--uva-brand-blue, #232d4b));
|
|
271
|
+
font-weight: 400;
|
|
272
|
+
text-decoration: underline;
|
|
273
|
+
}
|
|
274
|
+
.panel a:hover {
|
|
275
|
+
background-color: var(--uva-color-surface-hover, var(--uva-grey-100, #dadada));
|
|
276
|
+
text-decoration: none;
|
|
277
|
+
}
|
|
278
|
+
${O}
|
|
279
|
+
/* Current page, and the group holding it: bold with a thick underline, not colour alone. */
|
|
280
|
+
[aria-current]:not([aria-current='false']),
|
|
281
|
+
.panel a[aria-current]:not([aria-current='false']):hover {
|
|
282
|
+
font-weight: 700;
|
|
283
|
+
text-decoration-line: underline;
|
|
284
|
+
text-decoration-thickness: 3px;
|
|
285
|
+
text-decoration-color: var(--uva-color-current, var(--uva-brand-orange, #e57200));
|
|
286
|
+
text-underline-offset: 0.3em;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/* Bar: a full-width row with the brand-blue rule, content capped at 1600px. */
|
|
290
|
+
.bar {
|
|
291
|
+
border-bottom: 5px solid var(--uva-color-accent-bg, var(--uva-brand-blue, #232d4b));
|
|
292
|
+
background: var(--uva-color-surface-raised, #ffffff);
|
|
293
|
+
}
|
|
294
|
+
.bar > ul {
|
|
295
|
+
display: flex;
|
|
296
|
+
flex-wrap: wrap;
|
|
297
|
+
box-sizing: border-box;
|
|
298
|
+
max-inline-size: 1600px;
|
|
299
|
+
margin-inline: auto;
|
|
300
|
+
padding-inline: 16px;
|
|
301
|
+
}
|
|
302
|
+
.bar > ul > li {
|
|
303
|
+
position: relative;
|
|
304
|
+
display: flex;
|
|
305
|
+
}
|
|
306
|
+
.bar .toggle,
|
|
307
|
+
.bar .top-link {
|
|
308
|
+
padding: 11.5px 17px;
|
|
309
|
+
}
|
|
310
|
+
.bar .panel {
|
|
311
|
+
position: absolute;
|
|
312
|
+
top: 100%;
|
|
313
|
+
inset-inline-start: 0;
|
|
314
|
+
z-index: 1000;
|
|
315
|
+
box-sizing: border-box;
|
|
316
|
+
inline-size: max-content;
|
|
317
|
+
min-inline-size: 100%;
|
|
318
|
+
max-inline-size: 20rem;
|
|
319
|
+
background: var(--uva-color-surface-raised, #ffffff);
|
|
320
|
+
border-radius: 0 0 4px 4px;
|
|
321
|
+
box-shadow: 0 8px 16px var(--uva-color-shadow, rgba(0, 0, 0, 0.2));
|
|
322
|
+
/* Invisible normally; forced colors paint it, so the panel keeps an edge. */
|
|
323
|
+
outline: 1px solid transparent;
|
|
324
|
+
}
|
|
325
|
+
.bar .panel a {
|
|
326
|
+
padding: 8.5px 17px;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/* Accordion (the header's narrow-screen Menu popover): full-width rows, panels in flow. */
|
|
330
|
+
.accordion .toggle,
|
|
331
|
+
.accordion .top-link {
|
|
332
|
+
inline-size: 100%;
|
|
333
|
+
justify-content: space-between;
|
|
334
|
+
padding: 0.375rem 0.5rem;
|
|
335
|
+
}
|
|
336
|
+
.accordion .toggle::after {
|
|
337
|
+
margin-inline-end: 0.25em;
|
|
338
|
+
}
|
|
339
|
+
.accordion .panel {
|
|
340
|
+
position: static;
|
|
341
|
+
padding-inline-start: 1rem;
|
|
342
|
+
}
|
|
343
|
+
.accordion .panel a {
|
|
344
|
+
padding: 0.375rem 0.5rem;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/* Forced colors drop backgrounds and shadows: outline the open group and hovered
|
|
348
|
+
controls instead. */
|
|
349
|
+
@media (forced-colors: active) {
|
|
350
|
+
.toggle[aria-expanded='true']:not(:focus-visible),
|
|
351
|
+
.toggle:hover:not(:focus-visible),
|
|
352
|
+
.top-link:hover:not(:focus-visible),
|
|
353
|
+
.panel a:hover:not(:focus-visible) {
|
|
354
|
+
outline: 1px solid CanvasText;
|
|
355
|
+
outline-offset: -1px;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
`];
|
|
359
|
+
}
|
|
360
|
+
installLightStyles(e) {
|
|
361
|
+
super.installLightStyles(e), c(`${this.localName}-focus`, [k(this.localName)], {
|
|
362
|
+
root: e,
|
|
363
|
+
scope: !1,
|
|
364
|
+
layer: !1
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
connectedCallback() {
|
|
368
|
+
super.connectedCallback(), this.syncSource(), this.listenLocation(!0), this.listenOutside(this.open !== null && this.layout === "bar");
|
|
369
|
+
}
|
|
370
|
+
disconnectedCallback() {
|
|
371
|
+
super.disconnectedCallback(), this.observer?.disconnect(), this.listenOutside(!1), this.listenLocation(!1);
|
|
372
|
+
}
|
|
373
|
+
locationTargets() {
|
|
374
|
+
let e = this.ownerDocument.defaultView;
|
|
375
|
+
if (!e) return [];
|
|
376
|
+
let t = e.navigation;
|
|
377
|
+
return [
|
|
378
|
+
{
|
|
379
|
+
target: e,
|
|
380
|
+
type: "popstate"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
target: e,
|
|
384
|
+
type: "hashchange"
|
|
385
|
+
},
|
|
386
|
+
...t ? [{
|
|
387
|
+
target: t,
|
|
388
|
+
type: "currententrychange"
|
|
389
|
+
}] : []
|
|
390
|
+
];
|
|
391
|
+
}
|
|
392
|
+
listenLocation(e) {
|
|
393
|
+
if (e !== this.listeningLocation) {
|
|
394
|
+
this.listeningLocation = e;
|
|
395
|
+
for (let { target: t, type: n } of this.locationTargets()) e ? t.addEventListener(n, this.onLocationChange) : t.removeEventListener(n, this.onLocationChange);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
warnOnce(e, t) {
|
|
399
|
+
this.warned.has(e) || (this.warned.add(e), console.warn(e === "invalid" ? `${this.localName}: ignoring invalid ${t} entries (each needs a label, and an href or links).` : `${this.localName}: ${t} nests deeper than two levels; the deeper links are shown in their group.`));
|
|
400
|
+
}
|
|
401
|
+
use(e, t) {
|
|
402
|
+
return e.invalid && this.warnOnce("invalid", t), e.flattened && this.warnOnce("flattened", t), e.items.length ? e.items : null;
|
|
403
|
+
}
|
|
404
|
+
adoptSource() {
|
|
405
|
+
let e = [...this.children].filter(T);
|
|
406
|
+
return e.length && !this.holder && (this.holder = document.createElement("div"), this.holder.hidden = !0, this.holder.className = "main-nav-source"), this.holder && (this.holder.append(...e), this.holder.parentNode !== this && this.append(this.holder)), this.holder ? [...this.holder.children] : [];
|
|
407
|
+
}
|
|
408
|
+
syncSource() {
|
|
409
|
+
let e = this.lightDom ? this.adoptSource() : [...this.children].filter(T), t = null;
|
|
410
|
+
if (e.length) {
|
|
411
|
+
let n = e.flatMap((e, t) => t === 0 ? _(e) : [{}]);
|
|
412
|
+
t = this.use(h(n), "slot=\"main-nav\"");
|
|
413
|
+
}
|
|
414
|
+
JSON.stringify(t) !== JSON.stringify(this.slotItems) && (this.slotItems = t), this.observer ??= new MutationObserver(() => this.syncSource()), this.observer.disconnect();
|
|
415
|
+
let n = {
|
|
416
|
+
attributes: !0,
|
|
417
|
+
attributeFilter: E,
|
|
418
|
+
characterData: !0,
|
|
419
|
+
childList: !0,
|
|
420
|
+
subtree: !0
|
|
421
|
+
};
|
|
422
|
+
this.lightDom ? (this.observer.observe(this, { childList: !0 }), this.holder && this.observer.observe(this.holder, n)) : this.observer.observe(this, n);
|
|
423
|
+
}
|
|
424
|
+
willUpdate(e) {
|
|
425
|
+
e.has("items") && (this.propItems = this.items == null ? null : this.use(h(this.items), "items")), e.has("itemsSrc") && this.fetchedFor !== this.itemsSrc && (this.fetched = null, this.fetchedFor = void 0);
|
|
426
|
+
let t = this.itemsSrc;
|
|
427
|
+
t && !this.slotItems && !this.propItems && this.fetchedFor !== t && (this.fetchedFor = t, x(t).then((e) => {
|
|
428
|
+
this.itemsSrc === t && (this.fetched = this.use(e, "items-src"));
|
|
429
|
+
}, (e) => {
|
|
430
|
+
this.itemsSrc === t && this.dispatchEvent(new CustomEvent("site-main-nav-error", {
|
|
431
|
+
detail: {
|
|
432
|
+
src: t,
|
|
433
|
+
message: e instanceof Error ? e.message : String(e)
|
|
434
|
+
},
|
|
435
|
+
bubbles: !0,
|
|
436
|
+
composed: !0
|
|
437
|
+
}));
|
|
438
|
+
}));
|
|
439
|
+
let n = JSON.stringify(this.shown);
|
|
440
|
+
this.shownKey !== void 0 && n !== this.shownKey && (this.open = null), this.shownKey = n;
|
|
441
|
+
}
|
|
442
|
+
updated(e) {
|
|
443
|
+
(e.has("open") || e.has("layout")) && this.listenOutside(this.isConnected && this.open !== null && this.layout === "bar");
|
|
444
|
+
}
|
|
445
|
+
get shown() {
|
|
446
|
+
return this.slotItems ?? this.propItems ?? this.fetched ?? S;
|
|
447
|
+
}
|
|
448
|
+
get navEl() {
|
|
449
|
+
return this.renderRoot.querySelector("nav.main-nav");
|
|
450
|
+
}
|
|
451
|
+
get tops() {
|
|
452
|
+
let e = this.navEl;
|
|
453
|
+
return e ? [...e.querySelectorAll(":scope > ul > li > :is(.toggle, .top-link)")] : [];
|
|
454
|
+
}
|
|
455
|
+
setOpen(e) {
|
|
456
|
+
this.open = e;
|
|
457
|
+
}
|
|
458
|
+
onToggle(e) {
|
|
459
|
+
let t = this.open !== e;
|
|
460
|
+
this.setOpen(t ? e : null);
|
|
461
|
+
let n = this.shown[e]?.label;
|
|
462
|
+
t && n && u(this, [
|
|
463
|
+
"site-main-nav",
|
|
464
|
+
"menu-open",
|
|
465
|
+
n
|
|
466
|
+
]);
|
|
467
|
+
}
|
|
468
|
+
listenOutside(e) {
|
|
469
|
+
if (e === this.listening) return;
|
|
470
|
+
this.listening = e;
|
|
471
|
+
let t = this.ownerDocument;
|
|
472
|
+
e ? t.addEventListener("pointerdown", this.onOutsidePointer, !0) : t.removeEventListener("pointerdown", this.onOutsidePointer, !0);
|
|
473
|
+
}
|
|
474
|
+
onFocusOut(e) {
|
|
475
|
+
if (this.layout !== "bar" || this.open === null) return;
|
|
476
|
+
let t = e.relatedTarget;
|
|
477
|
+
t && !this.navEl?.contains(t) && this.setOpen(null);
|
|
478
|
+
}
|
|
479
|
+
move(e, t, n) {
|
|
480
|
+
let r;
|
|
481
|
+
switch (e.key) {
|
|
482
|
+
case "ArrowUp":
|
|
483
|
+
case "ArrowLeft":
|
|
484
|
+
r = Math.max(0, n - 1);
|
|
485
|
+
break;
|
|
486
|
+
case "ArrowDown":
|
|
487
|
+
case "ArrowRight":
|
|
488
|
+
r = Math.min(t.length - 1, n + 1);
|
|
489
|
+
break;
|
|
490
|
+
case "Home":
|
|
491
|
+
r = 0;
|
|
492
|
+
break;
|
|
493
|
+
case "End":
|
|
494
|
+
r = t.length - 1;
|
|
495
|
+
break;
|
|
496
|
+
default: return;
|
|
497
|
+
}
|
|
498
|
+
e.preventDefault(), t[r]?.focus();
|
|
499
|
+
}
|
|
500
|
+
onKeyDown(e) {
|
|
501
|
+
if (e.altKey || e.ctrlKey || e.metaKey) return;
|
|
502
|
+
let t = e.target, n = this.tops, r = n.indexOf(t), i = this.open, a = i === null ? null : this.toggleAt(i);
|
|
503
|
+
if (r >= 0) {
|
|
504
|
+
if (e.key === "Escape") {
|
|
505
|
+
if (i === null) return;
|
|
506
|
+
e.preventDefault(), this.setOpen(null);
|
|
507
|
+
} else e.key === "ArrowDown" && a === t ? (e.preventDefault(), this.panelOf(a)?.querySelector("a")?.focus()) : this.move(e, n, r);
|
|
508
|
+
return;
|
|
509
|
+
}
|
|
510
|
+
let o = t.closest(".panel");
|
|
511
|
+
if (!o || !a || this.panelOf(a) !== o) return;
|
|
512
|
+
if (e.key === "Escape") {
|
|
513
|
+
e.preventDefault(), this.setOpen(null), a.focus();
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
let s = [...o.querySelectorAll("a")];
|
|
517
|
+
this.move(e, s, s.indexOf(t));
|
|
518
|
+
}
|
|
519
|
+
toggleAt(e) {
|
|
520
|
+
return this.navEl?.querySelector(`[aria-controls="${this.panelId(e)}"]`) ?? null;
|
|
521
|
+
}
|
|
522
|
+
panelOf(e) {
|
|
523
|
+
let t = e.nextElementSibling;
|
|
524
|
+
return t && t.id === e.getAttribute("aria-controls") ? t : null;
|
|
525
|
+
}
|
|
526
|
+
panelId(e) {
|
|
527
|
+
return `${this.idBase}-${e}`;
|
|
528
|
+
}
|
|
529
|
+
currentHref(e) {
|
|
530
|
+
let t = this.current || this.ownerDocument.defaultView?.location.href || "", n = this.ownerDocument.baseURI, r = A(t, n);
|
|
531
|
+
if (!r) return null;
|
|
532
|
+
let i = e.filter((e) => A(e, n) === r), a = j(t, n);
|
|
533
|
+
return i.find((e) => a && j(e, n) === a) ?? i.find((e) => !j(e, n)) ?? (a ? null : i[0]) ?? null;
|
|
534
|
+
}
|
|
535
|
+
resolve(e) {
|
|
536
|
+
return e.startsWith("#") ? e : f(this.rootLinkDomain, e);
|
|
537
|
+
}
|
|
538
|
+
onClick(e) {
|
|
539
|
+
this.open !== null && e.button === 0 && (e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || e.composedPath().some((e) => e instanceof Element && e.localName === "a") && this.setOpen(null));
|
|
540
|
+
}
|
|
541
|
+
render() {
|
|
542
|
+
let e = this.shown.map((e) => ({
|
|
543
|
+
label: e.label,
|
|
544
|
+
href: e.items ? void 0 : this.resolve(e.href),
|
|
545
|
+
items: e.items?.map((e) => ({
|
|
546
|
+
label: e.label,
|
|
547
|
+
href: this.resolve(e.href)
|
|
548
|
+
}))
|
|
549
|
+
})), t = e.flatMap((e) => e.items ? e.items.map((e) => e.href) : [e.href]), n = this.currentHref(t), i = (e) => e === n ? "page" : void 0, a = !1;
|
|
550
|
+
return r`<nav
|
|
551
|
+
class="main-nav ${this.layout === "accordion" ? "accordion" : "bar"}"
|
|
552
|
+
aria-label=${this.label}
|
|
553
|
+
@keydown=${this.onKeyDown}
|
|
554
|
+
@focusout=${this.onFocusOut}
|
|
555
|
+
@click=${this.onClick}
|
|
556
|
+
>
|
|
557
|
+
<ul>
|
|
558
|
+
${e.map((e, t) => {
|
|
559
|
+
if (!e.items) {
|
|
560
|
+
let t = !a && i(e.href);
|
|
561
|
+
return t && (a = !0), r`<li>
|
|
562
|
+
<a class="top-link" href=${e.href} aria-current=${p(t || void 0)}
|
|
563
|
+
>${e.label}</a
|
|
564
|
+
>
|
|
565
|
+
</li>`;
|
|
566
|
+
}
|
|
567
|
+
let o = this.panelId(t), s = this.open === t, c = !a && e.items.some((e) => e.href === n), l = !1;
|
|
568
|
+
return c && (a = !0), r`<li>
|
|
569
|
+
<button
|
|
570
|
+
type="button"
|
|
571
|
+
class="toggle"
|
|
572
|
+
aria-expanded=${s ? "true" : "false"}
|
|
573
|
+
aria-controls=${o}
|
|
574
|
+
aria-current=${p(c ? "true" : void 0)}
|
|
575
|
+
@click=${() => this.onToggle(t)}
|
|
576
|
+
>
|
|
577
|
+
${e.label}
|
|
578
|
+
</button>
|
|
579
|
+
<ul class="panel" id=${o} ?hidden=${!s}>
|
|
580
|
+
${e.items.map((e) => {
|
|
581
|
+
let t = c && !l && e.href === n;
|
|
582
|
+
return t && (l = !0), r`<li>
|
|
583
|
+
<a href=${e.href} aria-current=${p(t ? "page" : void 0)}
|
|
584
|
+
>${e.label}</a
|
|
585
|
+
>
|
|
586
|
+
</li>`;
|
|
587
|
+
})}
|
|
588
|
+
</ul>
|
|
589
|
+
</li>`;
|
|
590
|
+
})}
|
|
591
|
+
</ul>
|
|
592
|
+
</nav>`;
|
|
593
|
+
}
|
|
594
|
+
};
|
|
595
|
+
// src/components/site-main-nav/site-main-nav.ts
|
|
596
|
+
a([e({ type: String })], M.prototype, "label", void 0), a([e({
|
|
597
|
+
type: String,
|
|
598
|
+
attribute: "root-link-domain"
|
|
599
|
+
})], M.prototype, "rootLinkDomain", void 0), a([e({
|
|
600
|
+
type: String,
|
|
601
|
+
attribute: "items-src"
|
|
602
|
+
})], M.prototype, "itemsSrc", void 0), a([e({ type: String })], M.prototype, "layout", void 0), a([e({ type: String })], M.prototype, "current", void 0), a([e({ attribute: !1 })], M.prototype, "items", void 0), a([n()], M.prototype, "slotItems", void 0), a([n()], M.prototype, "fetched", void 0), a([n()], M.prototype, "open", void 0), i("site-main-nav", M);
|
|
603
|
+
export { p as i, h as n, _ as r, M as t };
|
|
604
|
+
|
|
605
|
+
//# sourceMappingURL=site-main-nav-BLAAunnr.js.map
|