@penn-libraries/web 1.1.1-dev.2 → 1.2.0-dev.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/dist/cjs/{index-DVr0pLZy.js → index-Ag6DtE87.js} +4 -15
- package/dist/cjs/index-Ag6DtE87.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/pennlibs-autocomplete.pennlibs-feedback.pennlibs-footer.pennlibs-header.entry.cjs.js.map +1 -0
- package/dist/cjs/{pennlibs-autocomplete_5.cjs.entry.js → pennlibs-autocomplete_4.cjs.entry.js} +50 -258
- package/dist/cjs/pennlibs-banner.cjs.entry.js +1 -1
- package/dist/cjs/pennlibs-chat.cjs.entry.js +1 -1
- package/dist/cjs/pennlibs-fallback-img.cjs.entry.js +20 -0
- package/dist/cjs/pennlibs-fallback-img.entry.cjs.js.map +1 -0
- package/dist/cjs/pennlibs-hero.cjs.entry.js +3 -3
- package/dist/cjs/pennlibs-hero.entry.cjs.js.map +1 -1
- package/dist/cjs/pennlibs-iiif-img.cjs.entry.js +249 -0
- package/dist/cjs/pennlibs-iiif-img.entry.cjs.js.map +1 -0
- package/dist/cjs/web.cjs.js +2 -2
- package/dist/collection/assets/fonts/perpetua.woff +0 -0
- package/dist/collection/assets/fonts/perpetua.woff2 +0 -0
- package/dist/collection/components/pennlibs-feedback/pennlibs-feedback.css +23 -14
- package/dist/collection/components/pennlibs-feedback/pennlibs-feedback.js +50 -17
- package/dist/collection/components/pennlibs-feedback/pennlibs-feedback.js.map +1 -1
- package/dist/collection/components/pennlibs-footer/pennlibs-footer.css +13 -1
- package/dist/collection/components/pennlibs-footer/pennlibs-footer.js +3 -3
- package/dist/collection/components/pennlibs-footer/pennlibs-footer.js.map +1 -1
- package/dist/collection/components/pennlibs-header/pennlibs-header.js +1 -1
- package/dist/collection/components/pennlibs-hero/pennlibs-hero.css +1 -1
- package/dist/collection/components/pennlibs-hero/pennlibs-hero.js +1 -1
- package/dist/components/pennlibs-feedback.js +16 -17
- package/dist/components/pennlibs-feedback.js.map +1 -1
- package/dist/components/pennlibs-footer.js +4 -4
- package/dist/components/pennlibs-footer.js.map +1 -1
- package/dist/components/pennlibs-header.js +1 -1
- package/dist/components/pennlibs-hero.js +2 -2
- package/dist/components/pennlibs-hero.js.map +1 -1
- package/dist/docs.json +44 -5
- package/dist/{web/p-Cst_89-s.js → esm/index-CNQ9-Wwh.js} +5 -16
- package/dist/esm/index-CNQ9-Wwh.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/pennlibs-autocomplete.pennlibs-feedback.pennlibs-footer.pennlibs-header.entry.js.map +1 -0
- package/dist/esm/{pennlibs-autocomplete_5.entry.js → pennlibs-autocomplete_4.entry.js} +50 -257
- package/dist/esm/pennlibs-banner.entry.js +1 -1
- package/dist/esm/pennlibs-chat.entry.js +1 -1
- package/dist/esm/pennlibs-fallback-img.entry.js +18 -0
- package/dist/esm/pennlibs-fallback-img.entry.js.map +1 -0
- package/dist/esm/pennlibs-hero.entry.js +3 -3
- package/dist/esm/pennlibs-hero.entry.js.map +1 -1
- package/dist/esm/pennlibs-iiif-img.entry.js +247 -0
- package/dist/esm/pennlibs-iiif-img.entry.js.map +1 -0
- package/dist/esm/web.js +3 -3
- package/dist/types/components/pennlibs-feedback/pennlibs-feedback.d.ts +19 -3
- package/dist/types/components.d.ts +41 -0
- package/dist/web/assets/fonts/perpetua.woff +0 -0
- package/dist/web/assets/fonts/perpetua.woff2 +0 -0
- package/dist/web/index.esm.js +1 -1
- package/dist/web/p-662e4125.entry.js +18 -0
- package/dist/{esm/index-Cst_89-s.js → web/p-CNQ9-Wwh.js} +5 -16
- package/dist/web/p-CNQ9-Wwh.js.map +1 -0
- package/dist/web/{p-a9c79310.entry.js → p-a34e1e3e.entry.js} +1 -1
- package/dist/web/{p-4ffdbc93.entry.js → p-b6e686d1.entry.js} +3 -3
- package/dist/web/{p-6e0c2de9.entry.js → p-b9538aed.entry.js} +50 -257
- package/dist/web/{p-848d9acc.entry.js → p-c96a3643.entry.js} +1 -1
- package/dist/web/p-eb633f4d.entry.js +247 -0
- package/dist/web/pennlibs-autocomplete.pennlibs-feedback.pennlibs-footer.pennlibs-header.entry.esm.js.map +1 -0
- package/dist/web/pennlibs-fallback-img.entry.esm.js.map +1 -0
- package/dist/web/pennlibs-hero.entry.esm.js.map +1 -1
- package/dist/web/pennlibs-iiif-img.entry.esm.js.map +1 -0
- package/dist/web/web.css +36 -15
- package/dist/web/web.esm.js +3 -3
- package/hydrate/index.js +35 -36
- package/hydrate/index.mjs +35 -36
- package/package.json +1 -1
- package/dist/cjs/index-DVr0pLZy.js.map +0 -1
- package/dist/cjs/pennlibs-autocomplete.pennlibs-fallback-img.pennlibs-footer.pennlibs-header.pennlibs-iiif-img.entry.cjs.js.map +0 -1
- package/dist/cjs/pennlibs-feedback.cjs.entry.js +0 -58
- package/dist/cjs/pennlibs-feedback.entry.cjs.js.map +0 -1
- package/dist/esm/index-Cst_89-s.js.map +0 -1
- package/dist/esm/pennlibs-autocomplete.pennlibs-fallback-img.pennlibs-footer.pennlibs-header.pennlibs-iiif-img.entry.js.map +0 -1
- package/dist/esm/pennlibs-feedback.entry.js +0 -56
- package/dist/esm/pennlibs-feedback.entry.js.map +0 -1
- package/dist/web/p-621f166e.entry.js +0 -56
- package/dist/web/p-Cst_89-s.js.map +0 -1
- package/dist/web/pennlibs-autocomplete.pennlibs-fallback-img.pennlibs-footer.pennlibs-header.pennlibs-iiif-img.entry.esm.js.map +0 -1
- package/dist/web/pennlibs-feedback.entry.esm.js.map +0 -1
package/dist/web/web.css
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
@import url("https://use.typekit.net/gbh8cmg.css");
|
|
2
2
|
|
|
3
|
+
@font-face {
|
|
4
|
+
font-family: 'Perpetua';
|
|
5
|
+
src: url('assets/fonts/perpetua.woff2') format('woff2'),
|
|
6
|
+
url('assets/fonts/perpetua.woff') format('woff');
|
|
7
|
+
font-weight: 400;
|
|
8
|
+
font-display: swap;
|
|
9
|
+
}
|
|
10
|
+
|
|
3
11
|
:root {
|
|
4
12
|
--pl-color-penn-red: #990000;
|
|
5
13
|
--pl-color-penn-blue: #011F5B;
|
|
@@ -20,7 +28,7 @@
|
|
|
20
28
|
--pl-color-bg-gradient-2: linear-gradient(45deg, #dbe9f5, #feefdf);
|
|
21
29
|
--pl-font-size: 16px;
|
|
22
30
|
--pl-font-sans-serif: proxima-nova, system-ui, sans-serif;
|
|
23
|
-
--pl-font-serif:
|
|
31
|
+
--pl-font-serif: 'Perpetua', serif;
|
|
24
32
|
--pl-link-text-underline-offset: 0.2em;
|
|
25
33
|
--pl-link-text-decoration-thickness: 1px;
|
|
26
34
|
--pl-link-hover-text-decoration-thickness: 2px;
|
|
@@ -52,9 +60,9 @@
|
|
|
52
60
|
--pl-link-hover-text-decoration-thickness: 2px;
|
|
53
61
|
|
|
54
62
|
/* Font size tokens */
|
|
55
|
-
--pl-font-size-5xl:
|
|
56
|
-
--pl-font-size-4xl: 2.
|
|
57
|
-
--pl-font-size-3xl:
|
|
63
|
+
--pl-font-size-5xl: 3.5rem;
|
|
64
|
+
--pl-font-size-4xl: 2.5rem;
|
|
65
|
+
--pl-font-size-3xl: 2rem;
|
|
58
66
|
--pl-font-size-2xl: 1.5rem;
|
|
59
67
|
--pl-font-size-xl: 1.25rem;
|
|
60
68
|
--pl-font-size-l: 1.125rem;
|
|
@@ -175,9 +183,10 @@
|
|
|
175
183
|
|
|
176
184
|
& :is(h1, .pl-h1, h2, .pl-h2) {
|
|
177
185
|
font-family: var(--pl-font-serif);
|
|
186
|
+
font-weight: 400;
|
|
178
187
|
}
|
|
179
188
|
|
|
180
|
-
& :is(
|
|
189
|
+
& :is(h3, .pl-h3, h4, .pl-h4, h5, .pl-h5, h6, .pl-h6) {
|
|
181
190
|
font-weight: 600;
|
|
182
191
|
}
|
|
183
192
|
|
|
@@ -186,8 +195,7 @@
|
|
|
186
195
|
}
|
|
187
196
|
|
|
188
197
|
& :is(h1, .pl-h1, h2, .pl-h2) {
|
|
189
|
-
|
|
190
|
-
line-height: 1.125;
|
|
198
|
+
line-height: 1;
|
|
191
199
|
font-family: var(--pl-font-serif);
|
|
192
200
|
color: var(--pl-color-penn-blue);
|
|
193
201
|
position: relative;
|
|
@@ -204,7 +212,7 @@
|
|
|
204
212
|
|
|
205
213
|
& :is(h1, .pl-h1) {
|
|
206
214
|
font-size: var(--pl-font-size-5xl);
|
|
207
|
-
margin-bottom:
|
|
215
|
+
margin-bottom: var(--pl-space-l);
|
|
208
216
|
margin-top: 0;
|
|
209
217
|
|
|
210
218
|
&::after {
|
|
@@ -214,8 +222,8 @@
|
|
|
214
222
|
}
|
|
215
223
|
|
|
216
224
|
& :is(h2, .pl-h2) {
|
|
217
|
-
font-size: var(--pl-font-size-
|
|
218
|
-
margin-bottom:
|
|
225
|
+
font-size: var(--pl-font-size-4xl);
|
|
226
|
+
margin-bottom: var(--pl-space-m);
|
|
219
227
|
|
|
220
228
|
&::after {
|
|
221
229
|
background: #d6d6dc;
|
|
@@ -533,24 +541,37 @@
|
|
|
533
541
|
|
|
534
542
|
.pl-dl--inline {
|
|
535
543
|
display: block;
|
|
536
|
-
|
|
544
|
+
|
|
537
545
|
& dt,
|
|
538
546
|
& dd {
|
|
539
547
|
display: inline;
|
|
540
548
|
padding-right: 0.5rem;
|
|
541
549
|
margin-bottom: 0;
|
|
542
550
|
}
|
|
543
|
-
|
|
551
|
+
|
|
544
552
|
& dt {
|
|
545
553
|
font-weight: 600;
|
|
546
554
|
}
|
|
547
|
-
|
|
555
|
+
|
|
548
556
|
& dt:not(:first-of-type)::before {
|
|
549
557
|
content: "";
|
|
550
558
|
display: block;
|
|
551
|
-
margin-bottom: 0.
|
|
559
|
+
margin-bottom: 0.25rem;
|
|
552
560
|
}
|
|
553
|
-
|
|
561
|
+
|
|
562
|
+
& dd::after {
|
|
563
|
+
content: " ·";
|
|
564
|
+
padding-left: var(--pl-space-xs);
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
& dd:has(+ dt)::after {
|
|
568
|
+
all: unset;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
& > *:last-child::after {
|
|
572
|
+
all: unset;
|
|
573
|
+
}
|
|
574
|
+
|
|
554
575
|
& a {
|
|
555
576
|
color: var(--pl-color-fg-default);
|
|
556
577
|
text-decoration-style: dotted;
|
package/dist/web/web.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './p-
|
|
2
|
-
export { s as setNonce } from './p-
|
|
1
|
+
import { p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './p-CNQ9-Wwh.js';
|
|
2
|
+
export { s as setNonce } from './p-CNQ9-Wwh.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
Stencil Client Patch Browser v4.38.1 | MIT Licensed | https://stenciljs.com
|
|
@@ -16,6 +16,6 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["p-
|
|
19
|
+
return bootstrapLazy([["p-eb633f4d",[[257,"pennlibs-iiif-img",{"uuid":[1],"alt":[1],"region":[513],"rotation":[1],"quality":[1],"loading":[1],"showFallback":[4,"show-fallback"],"isLoaded":[32],"hasError":[32],"imageDimensions":[32],"observedWidth":[32]},null,{"region":["handleRegionChange"]}]]],["p-b9538aed",[[257,"pennlibs-autocomplete",{"for":[1],"showSuggestions":[32],"currentIndex":[32],"originalValue":[32],"options":[32]},[[0,"slotchange","handleSlotChange"],[16,"input","handleInputEvent"],[16,"focus","handleFocusEvent"],[16,"blur","handleBlurEvent"],[0,"focusout","handleFocusOut"],[4,"keydown","handleKeyDown"]]],[257,"pennlibs-feedback",{"hideQuestion":[4,"hide-question"],"error":[32],"answer":[32]}],[257,"pennlibs-footer",{"navigationByChildren":[32]}],[257,"pennlibs-header",{"serviceName":[1,"service-name"],"serviceLede":[1,"service-lede"],"serviceHref":[1,"service-href"],"theme":[1],"isMenuOpen":[32],"navigation":[32]}]]],["p-a34e1e3e",[[257,"pennlibs-banner"]]],["p-c96a3643",[[257,"pennlibs-chat",{"href":[32]}]]],["p-b6e686d1",[[257,"pennlibs-hero",{"heroPictureElement":[32],"heroHeadingElement":[32],"heroParagraphElement":[32],"heroSrc":[32]}]]],["p-662e4125",[[257,"pennlibs-fallback-img"]]]], options);
|
|
20
20
|
});
|
|
21
21
|
//# sourceMappingURL=web.esm.js.map
|
package/hydrate/index.js
CHANGED
|
@@ -1605,11 +1605,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
1605
1605
|
}
|
|
1606
1606
|
}
|
|
1607
1607
|
}
|
|
1608
|
-
} else if (memberName === "key") ; else if (memberName === "
|
|
1609
|
-
if (newValue) {
|
|
1610
|
-
newValue(elm);
|
|
1611
|
-
}
|
|
1612
|
-
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
1608
|
+
} else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
1613
1609
|
if (memberName[2] === "-") {
|
|
1614
1610
|
memberName = memberName.slice(3);
|
|
1615
1611
|
} else if (isMemberInElement(win, ln)) {
|
|
@@ -1852,7 +1848,6 @@ var removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
|
1852
1848
|
const vnode = vnodes[index];
|
|
1853
1849
|
if (vnode) {
|
|
1854
1850
|
const elm = vnode.$elm$;
|
|
1855
|
-
nullifyVNodeRefs(vnode);
|
|
1856
1851
|
if (elm) {
|
|
1857
1852
|
{
|
|
1858
1853
|
checkSlotFallbackVisibility = true;
|
|
@@ -2065,12 +2060,6 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
2065
2060
|
}
|
|
2066
2061
|
}
|
|
2067
2062
|
};
|
|
2068
|
-
var nullifyVNodeRefs = (vNode) => {
|
|
2069
|
-
{
|
|
2070
|
-
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
2071
|
-
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
2072
|
-
}
|
|
2073
|
-
};
|
|
2074
2063
|
var insertBefore = (parent, newNode, reference) => {
|
|
2075
2064
|
{
|
|
2076
2065
|
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
@@ -3671,7 +3660,7 @@ class Chat {
|
|
|
3671
3660
|
}; }
|
|
3672
3661
|
}
|
|
3673
3662
|
|
|
3674
|
-
const pennlibsFooterCss = ":host {\n font-family: var(--pl-font-family);\n font-size: var(--pl-font-size);\n --padding-bottom:
|
|
3663
|
+
const pennlibsFooterCss = ":host {\n font-family: var(--pl-font-family);\n font-size: var(--pl-font-size);\n --padding-bottom: 3em;\n}\n\n@media print {\n :host {\n display: none;\n }\n}\n\n*, *::before, *::after {\n box-sizing: border-box;\n}\n\n.website-footer-wrapper {\n background: var(--pl-color-penn-blue);\n padding-bottom: var(--padding-bottom);\n}\n\n.viewport-margins {\n max-width: var(--pl-viewport-margins-max-width);\n margin: 0 auto;\n padding: 0 var(--pl-viewport-margins-gutter, 1em);\n}\n\n.website-footer {\n background-size: cover;\n color: var(--pl-color-fg-subtle-on-emphasis);\n}\n\n.website-footer a {\n color: var(--pl-color-fg-subtle-on-emphasis);\n}\n\n.built-with,\n.built-with a {\n color: var(--pl-color-gray-blue-light);\n}\n\n.built-with {\n opacity: 0.85;\n margin: 0; \n padding: 1.5em 0;\n font-size: 0.875em;\n}\n\n.website-footer__content {\n padding: 4em 0;\n}\n\n.website-footer__links-container {\n gap: 4em 2em;\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(12em, 1fr));\n}\n\n.website-footer__heading {\n font-size: 0.8em;\n text-transform: uppercase;\n letter-spacing: 0.075em;\n margin-bottom: 1em;\n opacity: 0.75;\n}\n\n.website-footer__links {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: 0.75em;\n}\n\n.website-footer__links a {\n text-decoration: none;\n}\n\n.website-footer__links a:hover {\n text-decoration: underline;\n text-underline-offset: var(--pl-link-text-underline-offset);\n}\n\n.website-footer__footer {\n padding: 1em 0;\n background: rgba(1, 31, 91, 0.65);\n}\n\n.website-footer__links--footer {\n display: flex;\n flex-wrap: wrap;\n gap: 0;\n flex-direction: row;\n margin-left: -0.5em;\n\n @media (max-width: 1080px) {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(16em, 1fr));\n }\n}\n\n.website-footer__links--footer a {\n display: inline-block;\n padding: 0.5em 0.75em;\n font-size: 0.875em;\n opacity: 0.875;\n font-weight: 500;\n}\n\n.website-footer__links--footer a:hover {\n text-decoration: underline;\n text-underline-offset: var(--pl-link-text-underline-offset);\n}";
|
|
3675
3664
|
|
|
3676
3665
|
/**
|
|
3677
3666
|
* A footer component for Penn Libraries websites that displays contact information,
|
|
@@ -3725,12 +3714,12 @@ class Footer {
|
|
|
3725
3714
|
}
|
|
3726
3715
|
render() {
|
|
3727
3716
|
const footerBackgroundSrc = getAssetPath('./assets/footer-bg.webp');
|
|
3728
|
-
return (hAsync("
|
|
3717
|
+
return (hAsync("footer", { key: 'bc08bfaa926d4a5032cd089e735d2120d4982fb7', class: "website-footer-wrapper" }, hAsync("div", { key: 'f9491e7d0b774e1ee4fb5fe9dfe3644c008e4aa4', class: "website-footer", style: {
|
|
3729
3718
|
background: `var(--pl-color-penn-blue) url(${footerBackgroundSrc}) no-repeat 50% 50%`,
|
|
3730
3719
|
backgroundSize: 'cover',
|
|
3731
|
-
} }, hAsync("div", { key: '
|
|
3720
|
+
} }, hAsync("div", { key: 'c78698128c26439a783a6872bda1f6ad30010091', class: "viewport-margins" }, hAsync("div", { key: '0fa06835787b2b862adbc972040760505431eee4', class: "website-footer__content" }, hAsync("div", { key: '1f9f9b6e20e67be442295c15bbaed30a9bd4ed6c', class: "website-footer__links-container" }, hAsync("section", { key: 'a1ad90f23aa1e04d2a9ccb65f55aad8bd209865b' }, hAsync("h2", { key: '16c840dae80ded63eeb3dfe4dcd94712b6fbf3cb', class: "website-footer__heading" }, "Penn Libraries"), hAsync("ul", { key: 'c474ce0b1f79b630a09a4f290de3b90d4faf6322', class: "website-footer__links" }, hAsync("li", { key: 'ef2c4a81b658238a56345616b638a4b1bdeb86d7' }, hAsync("a", { key: 'fe75576d5007269fd63178b1cc231b6a99dfd183', href: "https://maps.google.com/?q=Van Pelt Library 3420 Walnut Street, Philadelphia, PA 19104-6206" }, "3420 Walnut Street", hAsync("br", { key: '4077d3f62c99b5f33305ead14d28b98cec6f6e7f' }), "Philadelphia, PA 19104-6206")), hAsync("li", { key: 'dcc868203318be48bce9bcb2af7feb429cfea045' }, hAsync("a", { key: 'd4268959f6d6796c4dda913910af4c0e8333b5f3', href: "tel:(215) 898-7555" }, "(215) 898-7555")), hAsync("li", { key: '65c7a446f25fde16e6dd13b9cd777522dcfe73de' }, hAsync("a", { key: 'd44ccc291db7ef87492723f5b8c0a6e27dd82b58', href: "https://www.library.upenn.edu/contact-us" }, "Contact us")), hAsync("li", { key: '6dda94dd8c3bd222e251e9b3c26228d6c79c65bc' }, hAsync("a", { key: '8378c775adba4789e107fc365c8f12dc283c5c39', href: "https://www.library.upenn.edu/about/hours", target: "_blank" }, "Locations and hours")))), hAsync("section", { key: '927c33a3a55c9b23ef16fb84ed0222e4222d8919' }, hAsync("h2", { key: '73ddc9d2175026ee31d00b6eefda8051be0768aa', class: "website-footer__heading" }, "Stay in touch"), hAsync("ul", { key: 'f51e60d3333e6185d4e94427a09a0907e65e3d92', class: "website-footer__links" }, hAsync("li", { key: '64d2313dbc8064af08d17a040695e39de3a65f99' }, hAsync("a", { key: 'a0c41592ec08c2a77e964270d30284442a6f01c2', href: "https://www.alumni.upenn.edu/libsignup" }, "Newsletter")), hAsync("li", { key: 'f0cf9bf81683933711a12d73bef11bbbabc2f445' }, hAsync("a", { key: '47b860bca9aa60196b3a037bfe3c1dd1b34b5024', href: "https://www.instagram.com/upennlib/" }, "Instagram")), hAsync("li", { key: '9039a7f7fc64465ec2622cdbad079972ebdf4292' }, hAsync("a", { key: '834b7a49f15847d2fa6f405e6e5a6320b0ea5967', href: "https://www.facebook.com/PennLibraries/" }, "Facebook")), hAsync("li", { key: 'cb4ca3a5afb95c7e1df0f11773062bfed4c66116' }, hAsync("a", { key: '82b2b1380689cdc1ee29ca55bab4bf5beb8ab825', href: "https://www.linkedin.com/company/penn-libraries" }, "LinkedIn")))), this.navigationByChildren && [
|
|
3732
3721
|
this.navigationByChildren.map(section => (hAsync("section", null, hAsync("h2", { class: "website-footer__heading" }, section.heading), hAsync("ul", { class: "website-footer__links" }, section.links.map(link => (hAsync("li", null, hAsync("a", { href: link.href }, link.label))))))))
|
|
3733
|
-
]))), hAsync("div", { key: '
|
|
3722
|
+
]))), hAsync("div", { key: 'a9172ba3d817c03ff081d67ae47aceeac317a916', class: "website-footer__footer" }, hAsync("div", { key: '2307a5282337a64bacbb1ce6574505a549527674', class: "viewport-margins" }, hAsync("ul", { key: '7783498f960416be4bcd4b525d674feae524ed40', class: "website-footer__links website-footer__links--footer" }, hAsync("li", { key: '90c904762368df68012945c96cfde96e34f939a7' }, hAsync("a", { key: '3c8b82331d85746a26ef69200137054aa1be6e72', href: "https://www.upenn.edu/" }, "UPenn")), hAsync("li", { key: '6ec4f2ed752187a65e6ce35644504d11a293972e' }, hAsync("a", { key: '036d0c03234a0a198304fd3075c8d888867bc2d8', href: "https://www.upenn.edu/about/privacy-policy" }, "Privacy Policy")), hAsync("li", { key: '729e69e9737a13ce8b007176ff2225542b6f76fe' }, hAsync("a", { key: '51410ccd4b0cfc73d1435df78acbf4d7775c9b5a', href: "https://accessibility.web-resources.upenn.edu/get-help" }, "Report Accessibility Issues and Get Help")), hAsync("li", { key: 'af7a7dfaf62607451c5c65daf2554aef228c2293' }, hAsync("a", { key: '924ebc36c5cfdcd9f5b99a783914eaaa9ff9851a', href: "https://www.upenn.edu/about/disclaimer" }, "Disclaimer")), hAsync("li", { key: 'd6a72f077412da636a998521382f747d56d0cc98' }, hAsync("a", { key: '6924c765a7b37f335167105a39b719d99937a330', href: "https://www.publicsafety.upenn.edu/contact/" }, "Emergency Services")), hAsync("li", { key: '0ddfa89abe2f7bb6b44f34443d78e491c5af5d58' }, hAsync("a", { key: 'cbaeccf216d3438a3da9633a29d90c91e225858b', href: "https://www.upenn.edu/about/report-copyright-infringement" }, "Report Copyright Infringement")))))), hAsync("div", { key: '9fc3fbb6bde995fac83a2ab795022846c19c6e5f', class: "viewport-margins" }, hAsync("p", { key: '73ec7cf307efbfe6565c27ac711a087d450e1372', class: "built-with" }, "Built with the ", hAsync("a", { key: '94ce8d4703ad2b9231ae15cd8018ab74889a48f6', href: "https://designsystem.library.upenn.edu/" }, "Penn Libraries Design System")))));
|
|
3734
3723
|
}
|
|
3735
3724
|
static get assetsDirs() { return ["assets"]; }
|
|
3736
3725
|
get hostElement() { return getElement(this); }
|
|
@@ -3818,7 +3807,7 @@ class Header {
|
|
|
3818
3807
|
return (hAsync("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24", viewBox: "0 -960 960 960", width: "24" }, hAsync("path", { fill: "currentColor", d: "M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z" })));
|
|
3819
3808
|
}
|
|
3820
3809
|
render() {
|
|
3821
|
-
return (hAsync("header", { key: '
|
|
3810
|
+
return (hAsync("header", { key: '6d14c72db0c06f38d66927f3f3102b7db82c1317', class: `viewport-margins website-header ${this.theme === 'dark' && 'website-header--dark'}` }, hAsync("div", { key: 'f7411c48f1f5ba8d267eb53cba7adb3d41c74aec', class: "website-header__inner-container" }, hAsync("div", { key: '78be403367c64beaf5b4cdceac458efc0007980e', class: "website-header__logo-name-container" }, hAsync("a", { key: '8b3e0da246ea69744b83debb0b5e23e271a64520', href: "https://www.library.upenn.edu/", class: "website-header_logo-link", "aria-label": "Penn Libraries" }, this.theme === 'dark' ? hAsync(LogoWhite, null) : hAsync(LogoBlue, null)), this.serviceName && (hAsync("a", { key: '1e1208fd657497dac0f3bb8a09d6b8e8507d2d04', href: "/", class: "website-header__service-link" }, hAsync("span", { key: '33a0c53e36a064a999025eeeae5d3bab9bca11bc', class: "website-header__service-name" }, this.serviceName), this.serviceLede && hAsync("span", { key: '809ca2fdb42dbc35a80474a0e06a39bbba5fb675', class: "website-header__service-lede" }, this.serviceLede))), hAsync("slot", { key: '91cfd1e15bd1e7de19a418d0bc05095fd634870b', name: "name-end" })), this.navigation.length > 0 && (hAsync("nav", { key: 'ce1c1d9fb21fa12b81fb17f9204885c27f86e380', class: "website-header__navigation" }, hAsync("button", { key: 'bdefe1220e526611c7ff9ef9f46be67028077263', class: "website-header__navigation-button", "aria-expanded": `${this.isMenuOpen}`, onClick: () => this.handleToggleMenu() }, this.renderMenuIcon(), " Menu"), this.navigation && (hAsync("ol", { key: '0af8e80d1ba55d267037e28d18caa03714600b22', class: `website-header__navigation-list ${this.isMenuOpen && 'website-header__navigation-list--visible'}` }, this.navigation.map(element => hAsync("li", { innerHTML: element.outerHTML })))))), hAsync("slot", { key: '605d0e5b7caba6cdebf98ace0d708453ab0c4b0f', name: "end" }))));
|
|
3822
3811
|
}
|
|
3823
3812
|
static get assetsDirs() { return ["assets"]; }
|
|
3824
3813
|
get hostElement() { return getElement(this); }
|
|
@@ -3840,7 +3829,7 @@ class Header {
|
|
|
3840
3829
|
}; }
|
|
3841
3830
|
}
|
|
3842
3831
|
|
|
3843
|
-
const pennlibsHeroCss = ":host{--pl-hero-height:clamp(42vh, 32rem, 26rem);--pl-hero-heading-font:var(--pl-font-serif);--pl-hero-color:var(--pl-color-fg-on-emphasis)}*,*:before,*:after{box-sizing:inherit}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.viewport-margins{width:100%;max-width:var(--pl-viewport-margins-max-width);margin:0 auto;padding:0 var(--pl-viewport-margins-gutter, 1em)}.hero{position:relative;min-height:var(--pl-hero-height);height:100%;background-size:cover;background-repeat:no-repeat;background-position:50% 33%;display:flex}.hero::before{content:\"\";display:flex;width:100%;height:100%;top:0;position:absolute;background:linear-gradient(360deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 20%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.05) 100%);z-index:0}.hero::after{content:\"\";display:flex;width:100%;height:100%;top:0;position:absolute;background:linear-gradient(180deg, rgba(1, 31, 91, 1) 0%, rgba(1, 31, 91, 0.9) 10%, rgba(1, 31, 91, 0.8) 20%, rgba(1, 31, 91, 0.1) 50%, rgba(1, 31, 91, 0.0) 100%);z-index:0}.hero__content{position:relative;display:flex;flex-direction:column;width:100%;z-index:1}.hero__heading-container{margin-top:auto;padding-top:var(--pl-space-3xl);padding-bottom:var(--pl-space-3xl)}.hero__heading{text-shadow:1px 1px 2px var(--pl-color-fg-default);line-height:1.1;font-size:3em;font-weight:
|
|
3832
|
+
const pennlibsHeroCss = ":host{--pl-hero-height:clamp(42vh, 32rem, 26rem);--pl-hero-heading-font:var(--pl-font-serif);--pl-hero-color:var(--pl-color-fg-on-emphasis)}*,*:before,*:after{box-sizing:inherit}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.viewport-margins{width:100%;max-width:var(--pl-viewport-margins-max-width);margin:0 auto;padding:0 var(--pl-viewport-margins-gutter, 1em)}.hero{position:relative;min-height:var(--pl-hero-height);height:100%;background-size:cover;background-repeat:no-repeat;background-position:50% 33%;display:flex}.hero::before{content:\"\";display:flex;width:100%;height:100%;top:0;position:absolute;background:linear-gradient(360deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 20%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.05) 100%);z-index:0}.hero::after{content:\"\";display:flex;width:100%;height:100%;top:0;position:absolute;background:linear-gradient(180deg, rgba(1, 31, 91, 1) 0%, rgba(1, 31, 91, 0.9) 10%, rgba(1, 31, 91, 0.8) 20%, rgba(1, 31, 91, 0.1) 50%, rgba(1, 31, 91, 0.0) 100%);z-index:0}.hero__content{position:relative;display:flex;flex-direction:column;width:100%;z-index:1}.hero__heading-container{margin-top:auto;padding-top:var(--pl-space-3xl);padding-bottom:var(--pl-space-3xl)}.hero__heading{text-shadow:1px 1px 2px var(--pl-color-fg-default);line-height:1.1;font-size:3em;font-weight:400;font-family:var(--pl-hero-heading-font);text-wrap:pretty;max-width:30ch;margin:0;color:var(--pl-hero-color)}@media (max-width: 920px){.hero__heading{font-size:2.5em}}.hero__sub-heading{font-size:1.25em;font-family:var(--pl-font-family);font-weight:500;color:var(--pl-hero-color);max-width:52ch;text-wrap:pretty;margin-top:1em;margin-bottom:0}.hero__sub-heading a{text-decoration:underline;text-underline-offset:var(--pl-link-text-underline-offset);text-decoration-thickness:var(--pl-link-text-decoration-thickness);color:var(--pl-hero-color)}.hero__sub-heading a:hover{text-decoration-thickness:var(--pl-link-hover-text-decoration-thickness)}.hero__sub-heading strong{font-weight:bold}@media (max-width: 620px){.hero__heading{font-size:2.75em}.hero__sub-heading{font-size:1em}}";
|
|
3844
3833
|
|
|
3845
3834
|
const getCurrentImageSource = (pictureElement) => {
|
|
3846
3835
|
const imgElement = pictureElement.querySelector('img');
|
|
@@ -3895,7 +3884,7 @@ class Hero {
|
|
|
3895
3884
|
}
|
|
3896
3885
|
}
|
|
3897
3886
|
render() {
|
|
3898
|
-
return (hAsync("div", { key: '
|
|
3887
|
+
return (hAsync("div", { key: 'd05bbd0346ad50b3e0f3264b8263bcf54534adb5', class: "hero", style: { backgroundImage: `url(${this.heroSrc})` } }, hAsync("div", { key: 'd1016edd7705c437ee065e5bb355840bd9907bcb', class: "hero__content" }, hAsync("slot", { key: '89d03122b810c823516912236b899a0b77d62af7', name: "start" }), hAsync("div", { key: '723cc18e93c02990028d7f7f19afc8b861afa0f2', class: "hero__heading-container" }, this.heroHeadingElement && (hAsync("div", { key: 'bc634a22c4de25b7780b8d46bb1bf91cb50000be', class: "viewport-margins" }, hAsync("h1", { key: '307269e0a116a254b2dc94009fdbf5679a0e169d', class: "hero__heading", innerHTML: this.heroHeadingElement.innerText }), this.heroParagraphElement && hAsync("p", { key: '3258869e6449257d517312cedc4b7749deaaaf0f', class: "hero__sub-heading", innerHTML: this.heroParagraphElement.innerHTML })))))));
|
|
3899
3888
|
}
|
|
3900
3889
|
static get assetsDirs() { return ["assets"]; }
|
|
3901
3890
|
get hostElement() { return getElement(this); }
|
|
@@ -4212,19 +4201,41 @@ class NoImage {
|
|
|
4212
4201
|
}; }
|
|
4213
4202
|
}
|
|
4214
4203
|
|
|
4215
|
-
const pennlibsFeedbackCss = ":host{display:block;background:#eeeff4;
|
|
4204
|
+
const pennlibsFeedbackCss = ":host{display:block;background:#eeeff4;font-family:var(--pl-font-family);font-size:var(--pl-font-size);color:var(--pl-color-fg-default);line-height:1.4;box-sizing:border-box;padding:0.75em 0}@media print{:host{display:none}}*,*::before,*::after{box-sizing:border-box}.viewport-margins{max-width:var(--pl-viewport-margins-max-width);margin:0 auto;padding:0 var(--pl-viewport-margins-gutter, 1em)}.feedback__content{display:flex;justify-content:space-between;gap:var(--pl-space-s);flex-wrap:wrap}.feedback__inline-question{display:flex;flex-wrap:wrap;gap:0.5em;align-items:center}h2{display:inline-block;margin:0;font-family:var(--pl-font-sans-serif);font-size:1em;font-weight:600}p{margin:0;padding:calc(0.5em + 1px) 0}strong{font-weight:600}a{color:var(--pl-color-fg-accent);text-decoration:underline;text-underline-offset:var(--pl-link-text-underline-offset);text-decoration-thickness:var(--pl-link-hover-text-decoration-thickness)}button{all:unset;display:flex;align-items:center;gap:0.5em;padding:0.25em 1.25em;font-family:var(--pl-font-family);font-weight:500;line-height:1.4;color:var(--pl-color-fg-default);background:var(--pl-color-bg-default);border:solid 1px var(--pl-color-fg-subtle);border-radius:1em;box-sizing:border-box}button:hover{cursor:pointer}button:hover span{text-decoration:underline}*:focus{outline:0;box-shadow:0 0 0 2px var(--pl-color-bg-attention),\n 0 0 0 3px var(--pl-color-bg-emphasis)}p:focus{outline:none;box-shadow:0 0 0 2px var(--pl-color-bg-attention), 0 0 0 3px var(--pl-color-bg-emphasis)}@media (max-width: 26em){h2{display:block;width:100%;text-align:center}}.help-us{display:flex;flex-direction:column;gap:0.5em}.visually-hidden{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.visually-hidden:focus,.visually-hidden:active{clip:auto;clip-path:none;height:auto;overflow:visible;position:static;white-space:normal;width:auto}";
|
|
4216
4205
|
|
|
4217
4206
|
const FEEDBACK_STORAGE_KEY = 'pennlibs-feedback-answer';
|
|
4218
|
-
const
|
|
4207
|
+
const FEEDBACK_TIMESTAMP_KEY = 'pennlibs-feedback-timestamp';
|
|
4208
|
+
const FEEDBACK_TTL = 5 * 60 * 1000; // 5 minutes
|
|
4209
|
+
const FEEDBACK_QUESTION = 'Is this page useful?';
|
|
4219
4210
|
const FEEDBACK_ERROR_STORAGE_KEY = 'pennlibs-feedback-error';
|
|
4211
|
+
/**
|
|
4212
|
+
* A feedback component that asks visitors "Did you find what you need?" and
|
|
4213
|
+
* links to a feedback form. The answer is stored in sessionStorage for 5 minutes
|
|
4214
|
+
* to avoid re-prompting during a browsing session.
|
|
4215
|
+
*
|
|
4216
|
+
* @example
|
|
4217
|
+
* <pennlibs-feedback></pennlibs-feedback>
|
|
4218
|
+
*
|
|
4219
|
+
* @example
|
|
4220
|
+
* <pennlibs-feedback hide-question></pennlibs-feedback>
|
|
4221
|
+
*/
|
|
4220
4222
|
class PennlibsFeedback {
|
|
4221
4223
|
constructor(hostRef) {
|
|
4222
4224
|
registerInstance(this, hostRef);
|
|
4223
4225
|
this.feedbackEvent = createEvent(this, "pennlibs-feedback");
|
|
4226
|
+
/**
|
|
4227
|
+
* When true, hides the yes/no question and only shows the "share your feedback" link.
|
|
4228
|
+
*/
|
|
4229
|
+
this.hideQuestion = false;
|
|
4224
4230
|
this.error = false;
|
|
4225
4231
|
this.answer = undefined;
|
|
4226
4232
|
}
|
|
4227
4233
|
componentWillLoad() {
|
|
4234
|
+
const timestamp = sessionStorage.getItem(FEEDBACK_TIMESTAMP_KEY);
|
|
4235
|
+
if (timestamp && Date.now() - Number(timestamp) > FEEDBACK_TTL) {
|
|
4236
|
+
sessionStorage.removeItem(FEEDBACK_STORAGE_KEY);
|
|
4237
|
+
sessionStorage.removeItem(FEEDBACK_TIMESTAMP_KEY);
|
|
4238
|
+
}
|
|
4228
4239
|
if (sessionStorage.getItem(FEEDBACK_STORAGE_KEY)) {
|
|
4229
4240
|
this.answer = sessionStorage.getItem(FEEDBACK_STORAGE_KEY);
|
|
4230
4241
|
}
|
|
@@ -4232,18 +4243,11 @@ class PennlibsFeedback {
|
|
|
4232
4243
|
this.error = sessionStorage.getItem(FEEDBACK_ERROR_STORAGE_KEY) === 'true';
|
|
4233
4244
|
}
|
|
4234
4245
|
}
|
|
4235
|
-
componentDidRender() {
|
|
4236
|
-
if (this.answer === 'yes' && this.yesMessageRef) {
|
|
4237
|
-
this.yesMessageRef.focus();
|
|
4238
|
-
}
|
|
4239
|
-
else if (this.answer === 'no' && this.noMessageRef) {
|
|
4240
|
-
this.noMessageRef.focus();
|
|
4241
|
-
}
|
|
4242
|
-
}
|
|
4243
4246
|
handleFeedback(answer) {
|
|
4244
4247
|
var _a;
|
|
4245
4248
|
this.answer = answer;
|
|
4246
4249
|
sessionStorage.setItem(FEEDBACK_STORAGE_KEY, answer);
|
|
4250
|
+
sessionStorage.setItem(FEEDBACK_TIMESTAMP_KEY, String(Date.now()));
|
|
4247
4251
|
this.feedbackEvent.emit({
|
|
4248
4252
|
question: FEEDBACK_QUESTION,
|
|
4249
4253
|
answer: answer,
|
|
@@ -4253,19 +4257,14 @@ class PennlibsFeedback {
|
|
|
4253
4257
|
});
|
|
4254
4258
|
}
|
|
4255
4259
|
render() {
|
|
4256
|
-
|
|
4257
|
-
return (hAsync("div", { class: "feedback-container" }, hAsync("p", { ref: (el) => this.yesMessageRef = el, tabindex: "-1" }, hAsync("strong", null, "Thank you"), " for your feedback! \uD83D\uDC4D")));
|
|
4258
|
-
}
|
|
4259
|
-
if (this.answer === 'no') {
|
|
4260
|
-
return (hAsync("div", { class: "feedback-container" }, hAsync("p", { ref: (el) => this.noMessageRef = el, tabindex: "-1" }, "To ", hAsync("strong", null, "help us improve"), ", we'd like to know more about your visit. Please ", hAsync("a", { href: "https://www.library.upenn.edu/contact-us" }, "contact us with your feedback"), ".")));
|
|
4261
|
-
}
|
|
4262
|
-
return (hAsync("div", { class: "feedback-container" }, hAsync("h2", null, FEEDBACK_QUESTION), hAsync("button", { onClick: () => this.handleFeedback('yes') }, "\uD83D\uDC4D", hAsync("span", null, "Yes", hAsync("span", { class: "visually-hidden" }, ", I found what I need."))), hAsync("button", { onClick: () => this.handleFeedback('no') }, "\uD83D\uDC4E", hAsync("span", null, "No", hAsync("span", { class: "visually-hidden" }, ", I didn't find what I need.")))));
|
|
4260
|
+
return (hAsync("div", { key: '04053c96e964ee9f240ca1a77d7944ae0f53248d', class: "feedback__container" }, hAsync("div", { key: 'f5f524b449d3473c1ecc2d454787034c54a811a0', class: "viewport-margins" }, hAsync("div", { key: 'd0c832edc9361dac49d9cbfc143332fea04434ea', class: "feedback__content" }, !this.hideQuestion && (this.answer === 'yes' ? (hAsync("p", null, "Thank you for letting us know.")) : this.answer === 'no' ? (hAsync("p", null, "Thank you for letting us know. ", hAsync("a", { href: "https://www.library.upenn.edu/contact-us" }, "Contact us"), " if you need help.")) : (hAsync("div", { class: "feedback__inline-question" }, hAsync("h2", null, "Did you find what you need?"), hAsync("button", { onClick: () => this.handleFeedback('yes') }, hAsync("span", null, "Yes")), hAsync("button", { onClick: () => this.handleFeedback('no') }, hAsync("span", null, "No"))))), hAsync("div", { key: '9630ad5e35d6eea2ee63217410607eb50c3babc7', class: "feedback__share-feedback" }, hAsync("p", { key: '126aeabf45f338cc07b33ebca09c761611e7c8e1' }, "To help us improve, ", hAsync("a", { key: '8af38aed071ad75d60837a18845d28e5645c2768', href: "http://library.upenn.edu/feedback" }, "share your feedback"), "."))))));
|
|
4263
4261
|
}
|
|
4264
4262
|
static get style() { return pennlibsFeedbackCss; }
|
|
4265
4263
|
static get cmpMeta() { return {
|
|
4266
4264
|
"$flags$": 265,
|
|
4267
4265
|
"$tagName$": "pennlibs-feedback",
|
|
4268
4266
|
"$members$": {
|
|
4267
|
+
"hideQuestion": [4, "hide-question"],
|
|
4269
4268
|
"error": [32],
|
|
4270
4269
|
"answer": [32]
|
|
4271
4270
|
},
|
package/hydrate/index.mjs
CHANGED
|
@@ -1603,11 +1603,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
1603
1603
|
}
|
|
1604
1604
|
}
|
|
1605
1605
|
}
|
|
1606
|
-
} else if (memberName === "key") ; else if (memberName === "
|
|
1607
|
-
if (newValue) {
|
|
1608
|
-
newValue(elm);
|
|
1609
|
-
}
|
|
1610
|
-
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
1606
|
+
} else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
1611
1607
|
if (memberName[2] === "-") {
|
|
1612
1608
|
memberName = memberName.slice(3);
|
|
1613
1609
|
} else if (isMemberInElement(win, ln)) {
|
|
@@ -1850,7 +1846,6 @@ var removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
|
1850
1846
|
const vnode = vnodes[index];
|
|
1851
1847
|
if (vnode) {
|
|
1852
1848
|
const elm = vnode.$elm$;
|
|
1853
|
-
nullifyVNodeRefs(vnode);
|
|
1854
1849
|
if (elm) {
|
|
1855
1850
|
{
|
|
1856
1851
|
checkSlotFallbackVisibility = true;
|
|
@@ -2063,12 +2058,6 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
2063
2058
|
}
|
|
2064
2059
|
}
|
|
2065
2060
|
};
|
|
2066
|
-
var nullifyVNodeRefs = (vNode) => {
|
|
2067
|
-
{
|
|
2068
|
-
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
2069
|
-
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
2070
|
-
}
|
|
2071
|
-
};
|
|
2072
2061
|
var insertBefore = (parent, newNode, reference) => {
|
|
2073
2062
|
{
|
|
2074
2063
|
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
@@ -3669,7 +3658,7 @@ class Chat {
|
|
|
3669
3658
|
}; }
|
|
3670
3659
|
}
|
|
3671
3660
|
|
|
3672
|
-
const pennlibsFooterCss = ":host {\n font-family: var(--pl-font-family);\n font-size: var(--pl-font-size);\n --padding-bottom:
|
|
3661
|
+
const pennlibsFooterCss = ":host {\n font-family: var(--pl-font-family);\n font-size: var(--pl-font-size);\n --padding-bottom: 3em;\n}\n\n@media print {\n :host {\n display: none;\n }\n}\n\n*, *::before, *::after {\n box-sizing: border-box;\n}\n\n.website-footer-wrapper {\n background: var(--pl-color-penn-blue);\n padding-bottom: var(--padding-bottom);\n}\n\n.viewport-margins {\n max-width: var(--pl-viewport-margins-max-width);\n margin: 0 auto;\n padding: 0 var(--pl-viewport-margins-gutter, 1em);\n}\n\n.website-footer {\n background-size: cover;\n color: var(--pl-color-fg-subtle-on-emphasis);\n}\n\n.website-footer a {\n color: var(--pl-color-fg-subtle-on-emphasis);\n}\n\n.built-with,\n.built-with a {\n color: var(--pl-color-gray-blue-light);\n}\n\n.built-with {\n opacity: 0.85;\n margin: 0; \n padding: 1.5em 0;\n font-size: 0.875em;\n}\n\n.website-footer__content {\n padding: 4em 0;\n}\n\n.website-footer__links-container {\n gap: 4em 2em;\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(12em, 1fr));\n}\n\n.website-footer__heading {\n font-size: 0.8em;\n text-transform: uppercase;\n letter-spacing: 0.075em;\n margin-bottom: 1em;\n opacity: 0.75;\n}\n\n.website-footer__links {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: 0.75em;\n}\n\n.website-footer__links a {\n text-decoration: none;\n}\n\n.website-footer__links a:hover {\n text-decoration: underline;\n text-underline-offset: var(--pl-link-text-underline-offset);\n}\n\n.website-footer__footer {\n padding: 1em 0;\n background: rgba(1, 31, 91, 0.65);\n}\n\n.website-footer__links--footer {\n display: flex;\n flex-wrap: wrap;\n gap: 0;\n flex-direction: row;\n margin-left: -0.5em;\n\n @media (max-width: 1080px) {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(16em, 1fr));\n }\n}\n\n.website-footer__links--footer a {\n display: inline-block;\n padding: 0.5em 0.75em;\n font-size: 0.875em;\n opacity: 0.875;\n font-weight: 500;\n}\n\n.website-footer__links--footer a:hover {\n text-decoration: underline;\n text-underline-offset: var(--pl-link-text-underline-offset);\n}";
|
|
3673
3662
|
|
|
3674
3663
|
/**
|
|
3675
3664
|
* A footer component for Penn Libraries websites that displays contact information,
|
|
@@ -3723,12 +3712,12 @@ class Footer {
|
|
|
3723
3712
|
}
|
|
3724
3713
|
render() {
|
|
3725
3714
|
const footerBackgroundSrc = getAssetPath('./assets/footer-bg.webp');
|
|
3726
|
-
return (hAsync("
|
|
3715
|
+
return (hAsync("footer", { key: 'bc08bfaa926d4a5032cd089e735d2120d4982fb7', class: "website-footer-wrapper" }, hAsync("div", { key: 'f9491e7d0b774e1ee4fb5fe9dfe3644c008e4aa4', class: "website-footer", style: {
|
|
3727
3716
|
background: `var(--pl-color-penn-blue) url(${footerBackgroundSrc}) no-repeat 50% 50%`,
|
|
3728
3717
|
backgroundSize: 'cover',
|
|
3729
|
-
} }, hAsync("div", { key: '
|
|
3718
|
+
} }, hAsync("div", { key: 'c78698128c26439a783a6872bda1f6ad30010091', class: "viewport-margins" }, hAsync("div", { key: '0fa06835787b2b862adbc972040760505431eee4', class: "website-footer__content" }, hAsync("div", { key: '1f9f9b6e20e67be442295c15bbaed30a9bd4ed6c', class: "website-footer__links-container" }, hAsync("section", { key: 'a1ad90f23aa1e04d2a9ccb65f55aad8bd209865b' }, hAsync("h2", { key: '16c840dae80ded63eeb3dfe4dcd94712b6fbf3cb', class: "website-footer__heading" }, "Penn Libraries"), hAsync("ul", { key: 'c474ce0b1f79b630a09a4f290de3b90d4faf6322', class: "website-footer__links" }, hAsync("li", { key: 'ef2c4a81b658238a56345616b638a4b1bdeb86d7' }, hAsync("a", { key: 'fe75576d5007269fd63178b1cc231b6a99dfd183', href: "https://maps.google.com/?q=Van Pelt Library 3420 Walnut Street, Philadelphia, PA 19104-6206" }, "3420 Walnut Street", hAsync("br", { key: '4077d3f62c99b5f33305ead14d28b98cec6f6e7f' }), "Philadelphia, PA 19104-6206")), hAsync("li", { key: 'dcc868203318be48bce9bcb2af7feb429cfea045' }, hAsync("a", { key: 'd4268959f6d6796c4dda913910af4c0e8333b5f3', href: "tel:(215) 898-7555" }, "(215) 898-7555")), hAsync("li", { key: '65c7a446f25fde16e6dd13b9cd777522dcfe73de' }, hAsync("a", { key: 'd44ccc291db7ef87492723f5b8c0a6e27dd82b58', href: "https://www.library.upenn.edu/contact-us" }, "Contact us")), hAsync("li", { key: '6dda94dd8c3bd222e251e9b3c26228d6c79c65bc' }, hAsync("a", { key: '8378c775adba4789e107fc365c8f12dc283c5c39', href: "https://www.library.upenn.edu/about/hours", target: "_blank" }, "Locations and hours")))), hAsync("section", { key: '927c33a3a55c9b23ef16fb84ed0222e4222d8919' }, hAsync("h2", { key: '73ddc9d2175026ee31d00b6eefda8051be0768aa', class: "website-footer__heading" }, "Stay in touch"), hAsync("ul", { key: 'f51e60d3333e6185d4e94427a09a0907e65e3d92', class: "website-footer__links" }, hAsync("li", { key: '64d2313dbc8064af08d17a040695e39de3a65f99' }, hAsync("a", { key: 'a0c41592ec08c2a77e964270d30284442a6f01c2', href: "https://www.alumni.upenn.edu/libsignup" }, "Newsletter")), hAsync("li", { key: 'f0cf9bf81683933711a12d73bef11bbbabc2f445' }, hAsync("a", { key: '47b860bca9aa60196b3a037bfe3c1dd1b34b5024', href: "https://www.instagram.com/upennlib/" }, "Instagram")), hAsync("li", { key: '9039a7f7fc64465ec2622cdbad079972ebdf4292' }, hAsync("a", { key: '834b7a49f15847d2fa6f405e6e5a6320b0ea5967', href: "https://www.facebook.com/PennLibraries/" }, "Facebook")), hAsync("li", { key: 'cb4ca3a5afb95c7e1df0f11773062bfed4c66116' }, hAsync("a", { key: '82b2b1380689cdc1ee29ca55bab4bf5beb8ab825', href: "https://www.linkedin.com/company/penn-libraries" }, "LinkedIn")))), this.navigationByChildren && [
|
|
3730
3719
|
this.navigationByChildren.map(section => (hAsync("section", null, hAsync("h2", { class: "website-footer__heading" }, section.heading), hAsync("ul", { class: "website-footer__links" }, section.links.map(link => (hAsync("li", null, hAsync("a", { href: link.href }, link.label))))))))
|
|
3731
|
-
]))), hAsync("div", { key: '
|
|
3720
|
+
]))), hAsync("div", { key: 'a9172ba3d817c03ff081d67ae47aceeac317a916', class: "website-footer__footer" }, hAsync("div", { key: '2307a5282337a64bacbb1ce6574505a549527674', class: "viewport-margins" }, hAsync("ul", { key: '7783498f960416be4bcd4b525d674feae524ed40', class: "website-footer__links website-footer__links--footer" }, hAsync("li", { key: '90c904762368df68012945c96cfde96e34f939a7' }, hAsync("a", { key: '3c8b82331d85746a26ef69200137054aa1be6e72', href: "https://www.upenn.edu/" }, "UPenn")), hAsync("li", { key: '6ec4f2ed752187a65e6ce35644504d11a293972e' }, hAsync("a", { key: '036d0c03234a0a198304fd3075c8d888867bc2d8', href: "https://www.upenn.edu/about/privacy-policy" }, "Privacy Policy")), hAsync("li", { key: '729e69e9737a13ce8b007176ff2225542b6f76fe' }, hAsync("a", { key: '51410ccd4b0cfc73d1435df78acbf4d7775c9b5a', href: "https://accessibility.web-resources.upenn.edu/get-help" }, "Report Accessibility Issues and Get Help")), hAsync("li", { key: 'af7a7dfaf62607451c5c65daf2554aef228c2293' }, hAsync("a", { key: '924ebc36c5cfdcd9f5b99a783914eaaa9ff9851a', href: "https://www.upenn.edu/about/disclaimer" }, "Disclaimer")), hAsync("li", { key: 'd6a72f077412da636a998521382f747d56d0cc98' }, hAsync("a", { key: '6924c765a7b37f335167105a39b719d99937a330', href: "https://www.publicsafety.upenn.edu/contact/" }, "Emergency Services")), hAsync("li", { key: '0ddfa89abe2f7bb6b44f34443d78e491c5af5d58' }, hAsync("a", { key: 'cbaeccf216d3438a3da9633a29d90c91e225858b', href: "https://www.upenn.edu/about/report-copyright-infringement" }, "Report Copyright Infringement")))))), hAsync("div", { key: '9fc3fbb6bde995fac83a2ab795022846c19c6e5f', class: "viewport-margins" }, hAsync("p", { key: '73ec7cf307efbfe6565c27ac711a087d450e1372', class: "built-with" }, "Built with the ", hAsync("a", { key: '94ce8d4703ad2b9231ae15cd8018ab74889a48f6', href: "https://designsystem.library.upenn.edu/" }, "Penn Libraries Design System")))));
|
|
3732
3721
|
}
|
|
3733
3722
|
static get assetsDirs() { return ["assets"]; }
|
|
3734
3723
|
get hostElement() { return getElement(this); }
|
|
@@ -3816,7 +3805,7 @@ class Header {
|
|
|
3816
3805
|
return (hAsync("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24", viewBox: "0 -960 960 960", width: "24" }, hAsync("path", { fill: "currentColor", d: "M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z" })));
|
|
3817
3806
|
}
|
|
3818
3807
|
render() {
|
|
3819
|
-
return (hAsync("header", { key: '
|
|
3808
|
+
return (hAsync("header", { key: '6d14c72db0c06f38d66927f3f3102b7db82c1317', class: `viewport-margins website-header ${this.theme === 'dark' && 'website-header--dark'}` }, hAsync("div", { key: 'f7411c48f1f5ba8d267eb53cba7adb3d41c74aec', class: "website-header__inner-container" }, hAsync("div", { key: '78be403367c64beaf5b4cdceac458efc0007980e', class: "website-header__logo-name-container" }, hAsync("a", { key: '8b3e0da246ea69744b83debb0b5e23e271a64520', href: "https://www.library.upenn.edu/", class: "website-header_logo-link", "aria-label": "Penn Libraries" }, this.theme === 'dark' ? hAsync(LogoWhite, null) : hAsync(LogoBlue, null)), this.serviceName && (hAsync("a", { key: '1e1208fd657497dac0f3bb8a09d6b8e8507d2d04', href: "/", class: "website-header__service-link" }, hAsync("span", { key: '33a0c53e36a064a999025eeeae5d3bab9bca11bc', class: "website-header__service-name" }, this.serviceName), this.serviceLede && hAsync("span", { key: '809ca2fdb42dbc35a80474a0e06a39bbba5fb675', class: "website-header__service-lede" }, this.serviceLede))), hAsync("slot", { key: '91cfd1e15bd1e7de19a418d0bc05095fd634870b', name: "name-end" })), this.navigation.length > 0 && (hAsync("nav", { key: 'ce1c1d9fb21fa12b81fb17f9204885c27f86e380', class: "website-header__navigation" }, hAsync("button", { key: 'bdefe1220e526611c7ff9ef9f46be67028077263', class: "website-header__navigation-button", "aria-expanded": `${this.isMenuOpen}`, onClick: () => this.handleToggleMenu() }, this.renderMenuIcon(), " Menu"), this.navigation && (hAsync("ol", { key: '0af8e80d1ba55d267037e28d18caa03714600b22', class: `website-header__navigation-list ${this.isMenuOpen && 'website-header__navigation-list--visible'}` }, this.navigation.map(element => hAsync("li", { innerHTML: element.outerHTML })))))), hAsync("slot", { key: '605d0e5b7caba6cdebf98ace0d708453ab0c4b0f', name: "end" }))));
|
|
3820
3809
|
}
|
|
3821
3810
|
static get assetsDirs() { return ["assets"]; }
|
|
3822
3811
|
get hostElement() { return getElement(this); }
|
|
@@ -3838,7 +3827,7 @@ class Header {
|
|
|
3838
3827
|
}; }
|
|
3839
3828
|
}
|
|
3840
3829
|
|
|
3841
|
-
const pennlibsHeroCss = ":host{--pl-hero-height:clamp(42vh, 32rem, 26rem);--pl-hero-heading-font:var(--pl-font-serif);--pl-hero-color:var(--pl-color-fg-on-emphasis)}*,*:before,*:after{box-sizing:inherit}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.viewport-margins{width:100%;max-width:var(--pl-viewport-margins-max-width);margin:0 auto;padding:0 var(--pl-viewport-margins-gutter, 1em)}.hero{position:relative;min-height:var(--pl-hero-height);height:100%;background-size:cover;background-repeat:no-repeat;background-position:50% 33%;display:flex}.hero::before{content:\"\";display:flex;width:100%;height:100%;top:0;position:absolute;background:linear-gradient(360deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 20%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.05) 100%);z-index:0}.hero::after{content:\"\";display:flex;width:100%;height:100%;top:0;position:absolute;background:linear-gradient(180deg, rgba(1, 31, 91, 1) 0%, rgba(1, 31, 91, 0.9) 10%, rgba(1, 31, 91, 0.8) 20%, rgba(1, 31, 91, 0.1) 50%, rgba(1, 31, 91, 0.0) 100%);z-index:0}.hero__content{position:relative;display:flex;flex-direction:column;width:100%;z-index:1}.hero__heading-container{margin-top:auto;padding-top:var(--pl-space-3xl);padding-bottom:var(--pl-space-3xl)}.hero__heading{text-shadow:1px 1px 2px var(--pl-color-fg-default);line-height:1.1;font-size:3em;font-weight:
|
|
3830
|
+
const pennlibsHeroCss = ":host{--pl-hero-height:clamp(42vh, 32rem, 26rem);--pl-hero-heading-font:var(--pl-font-serif);--pl-hero-color:var(--pl-color-fg-on-emphasis)}*,*:before,*:after{box-sizing:inherit}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.viewport-margins{width:100%;max-width:var(--pl-viewport-margins-max-width);margin:0 auto;padding:0 var(--pl-viewport-margins-gutter, 1em)}.hero{position:relative;min-height:var(--pl-hero-height);height:100%;background-size:cover;background-repeat:no-repeat;background-position:50% 33%;display:flex}.hero::before{content:\"\";display:flex;width:100%;height:100%;top:0;position:absolute;background:linear-gradient(360deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 20%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.05) 100%);z-index:0}.hero::after{content:\"\";display:flex;width:100%;height:100%;top:0;position:absolute;background:linear-gradient(180deg, rgba(1, 31, 91, 1) 0%, rgba(1, 31, 91, 0.9) 10%, rgba(1, 31, 91, 0.8) 20%, rgba(1, 31, 91, 0.1) 50%, rgba(1, 31, 91, 0.0) 100%);z-index:0}.hero__content{position:relative;display:flex;flex-direction:column;width:100%;z-index:1}.hero__heading-container{margin-top:auto;padding-top:var(--pl-space-3xl);padding-bottom:var(--pl-space-3xl)}.hero__heading{text-shadow:1px 1px 2px var(--pl-color-fg-default);line-height:1.1;font-size:3em;font-weight:400;font-family:var(--pl-hero-heading-font);text-wrap:pretty;max-width:30ch;margin:0;color:var(--pl-hero-color)}@media (max-width: 920px){.hero__heading{font-size:2.5em}}.hero__sub-heading{font-size:1.25em;font-family:var(--pl-font-family);font-weight:500;color:var(--pl-hero-color);max-width:52ch;text-wrap:pretty;margin-top:1em;margin-bottom:0}.hero__sub-heading a{text-decoration:underline;text-underline-offset:var(--pl-link-text-underline-offset);text-decoration-thickness:var(--pl-link-text-decoration-thickness);color:var(--pl-hero-color)}.hero__sub-heading a:hover{text-decoration-thickness:var(--pl-link-hover-text-decoration-thickness)}.hero__sub-heading strong{font-weight:bold}@media (max-width: 620px){.hero__heading{font-size:2.75em}.hero__sub-heading{font-size:1em}}";
|
|
3842
3831
|
|
|
3843
3832
|
const getCurrentImageSource = (pictureElement) => {
|
|
3844
3833
|
const imgElement = pictureElement.querySelector('img');
|
|
@@ -3893,7 +3882,7 @@ class Hero {
|
|
|
3893
3882
|
}
|
|
3894
3883
|
}
|
|
3895
3884
|
render() {
|
|
3896
|
-
return (hAsync("div", { key: '
|
|
3885
|
+
return (hAsync("div", { key: 'd05bbd0346ad50b3e0f3264b8263bcf54534adb5', class: "hero", style: { backgroundImage: `url(${this.heroSrc})` } }, hAsync("div", { key: 'd1016edd7705c437ee065e5bb355840bd9907bcb', class: "hero__content" }, hAsync("slot", { key: '89d03122b810c823516912236b899a0b77d62af7', name: "start" }), hAsync("div", { key: '723cc18e93c02990028d7f7f19afc8b861afa0f2', class: "hero__heading-container" }, this.heroHeadingElement && (hAsync("div", { key: 'bc634a22c4de25b7780b8d46bb1bf91cb50000be', class: "viewport-margins" }, hAsync("h1", { key: '307269e0a116a254b2dc94009fdbf5679a0e169d', class: "hero__heading", innerHTML: this.heroHeadingElement.innerText }), this.heroParagraphElement && hAsync("p", { key: '3258869e6449257d517312cedc4b7749deaaaf0f', class: "hero__sub-heading", innerHTML: this.heroParagraphElement.innerHTML })))))));
|
|
3897
3886
|
}
|
|
3898
3887
|
static get assetsDirs() { return ["assets"]; }
|
|
3899
3888
|
get hostElement() { return getElement(this); }
|
|
@@ -4210,19 +4199,41 @@ class NoImage {
|
|
|
4210
4199
|
}; }
|
|
4211
4200
|
}
|
|
4212
4201
|
|
|
4213
|
-
const pennlibsFeedbackCss = ":host{display:block;background:#eeeff4;
|
|
4202
|
+
const pennlibsFeedbackCss = ":host{display:block;background:#eeeff4;font-family:var(--pl-font-family);font-size:var(--pl-font-size);color:var(--pl-color-fg-default);line-height:1.4;box-sizing:border-box;padding:0.75em 0}@media print{:host{display:none}}*,*::before,*::after{box-sizing:border-box}.viewport-margins{max-width:var(--pl-viewport-margins-max-width);margin:0 auto;padding:0 var(--pl-viewport-margins-gutter, 1em)}.feedback__content{display:flex;justify-content:space-between;gap:var(--pl-space-s);flex-wrap:wrap}.feedback__inline-question{display:flex;flex-wrap:wrap;gap:0.5em;align-items:center}h2{display:inline-block;margin:0;font-family:var(--pl-font-sans-serif);font-size:1em;font-weight:600}p{margin:0;padding:calc(0.5em + 1px) 0}strong{font-weight:600}a{color:var(--pl-color-fg-accent);text-decoration:underline;text-underline-offset:var(--pl-link-text-underline-offset);text-decoration-thickness:var(--pl-link-hover-text-decoration-thickness)}button{all:unset;display:flex;align-items:center;gap:0.5em;padding:0.25em 1.25em;font-family:var(--pl-font-family);font-weight:500;line-height:1.4;color:var(--pl-color-fg-default);background:var(--pl-color-bg-default);border:solid 1px var(--pl-color-fg-subtle);border-radius:1em;box-sizing:border-box}button:hover{cursor:pointer}button:hover span{text-decoration:underline}*:focus{outline:0;box-shadow:0 0 0 2px var(--pl-color-bg-attention),\n 0 0 0 3px var(--pl-color-bg-emphasis)}p:focus{outline:none;box-shadow:0 0 0 2px var(--pl-color-bg-attention), 0 0 0 3px var(--pl-color-bg-emphasis)}@media (max-width: 26em){h2{display:block;width:100%;text-align:center}}.help-us{display:flex;flex-direction:column;gap:0.5em}.visually-hidden{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.visually-hidden:focus,.visually-hidden:active{clip:auto;clip-path:none;height:auto;overflow:visible;position:static;white-space:normal;width:auto}";
|
|
4214
4203
|
|
|
4215
4204
|
const FEEDBACK_STORAGE_KEY = 'pennlibs-feedback-answer';
|
|
4216
|
-
const
|
|
4205
|
+
const FEEDBACK_TIMESTAMP_KEY = 'pennlibs-feedback-timestamp';
|
|
4206
|
+
const FEEDBACK_TTL = 5 * 60 * 1000; // 5 minutes
|
|
4207
|
+
const FEEDBACK_QUESTION = 'Is this page useful?';
|
|
4217
4208
|
const FEEDBACK_ERROR_STORAGE_KEY = 'pennlibs-feedback-error';
|
|
4209
|
+
/**
|
|
4210
|
+
* A feedback component that asks visitors "Did you find what you need?" and
|
|
4211
|
+
* links to a feedback form. The answer is stored in sessionStorage for 5 minutes
|
|
4212
|
+
* to avoid re-prompting during a browsing session.
|
|
4213
|
+
*
|
|
4214
|
+
* @example
|
|
4215
|
+
* <pennlibs-feedback></pennlibs-feedback>
|
|
4216
|
+
*
|
|
4217
|
+
* @example
|
|
4218
|
+
* <pennlibs-feedback hide-question></pennlibs-feedback>
|
|
4219
|
+
*/
|
|
4218
4220
|
class PennlibsFeedback {
|
|
4219
4221
|
constructor(hostRef) {
|
|
4220
4222
|
registerInstance(this, hostRef);
|
|
4221
4223
|
this.feedbackEvent = createEvent(this, "pennlibs-feedback");
|
|
4224
|
+
/**
|
|
4225
|
+
* When true, hides the yes/no question and only shows the "share your feedback" link.
|
|
4226
|
+
*/
|
|
4227
|
+
this.hideQuestion = false;
|
|
4222
4228
|
this.error = false;
|
|
4223
4229
|
this.answer = undefined;
|
|
4224
4230
|
}
|
|
4225
4231
|
componentWillLoad() {
|
|
4232
|
+
const timestamp = sessionStorage.getItem(FEEDBACK_TIMESTAMP_KEY);
|
|
4233
|
+
if (timestamp && Date.now() - Number(timestamp) > FEEDBACK_TTL) {
|
|
4234
|
+
sessionStorage.removeItem(FEEDBACK_STORAGE_KEY);
|
|
4235
|
+
sessionStorage.removeItem(FEEDBACK_TIMESTAMP_KEY);
|
|
4236
|
+
}
|
|
4226
4237
|
if (sessionStorage.getItem(FEEDBACK_STORAGE_KEY)) {
|
|
4227
4238
|
this.answer = sessionStorage.getItem(FEEDBACK_STORAGE_KEY);
|
|
4228
4239
|
}
|
|
@@ -4230,18 +4241,11 @@ class PennlibsFeedback {
|
|
|
4230
4241
|
this.error = sessionStorage.getItem(FEEDBACK_ERROR_STORAGE_KEY) === 'true';
|
|
4231
4242
|
}
|
|
4232
4243
|
}
|
|
4233
|
-
componentDidRender() {
|
|
4234
|
-
if (this.answer === 'yes' && this.yesMessageRef) {
|
|
4235
|
-
this.yesMessageRef.focus();
|
|
4236
|
-
}
|
|
4237
|
-
else if (this.answer === 'no' && this.noMessageRef) {
|
|
4238
|
-
this.noMessageRef.focus();
|
|
4239
|
-
}
|
|
4240
|
-
}
|
|
4241
4244
|
handleFeedback(answer) {
|
|
4242
4245
|
var _a;
|
|
4243
4246
|
this.answer = answer;
|
|
4244
4247
|
sessionStorage.setItem(FEEDBACK_STORAGE_KEY, answer);
|
|
4248
|
+
sessionStorage.setItem(FEEDBACK_TIMESTAMP_KEY, String(Date.now()));
|
|
4245
4249
|
this.feedbackEvent.emit({
|
|
4246
4250
|
question: FEEDBACK_QUESTION,
|
|
4247
4251
|
answer: answer,
|
|
@@ -4251,19 +4255,14 @@ class PennlibsFeedback {
|
|
|
4251
4255
|
});
|
|
4252
4256
|
}
|
|
4253
4257
|
render() {
|
|
4254
|
-
|
|
4255
|
-
return (hAsync("div", { class: "feedback-container" }, hAsync("p", { ref: (el) => this.yesMessageRef = el, tabindex: "-1" }, hAsync("strong", null, "Thank you"), " for your feedback! \uD83D\uDC4D")));
|
|
4256
|
-
}
|
|
4257
|
-
if (this.answer === 'no') {
|
|
4258
|
-
return (hAsync("div", { class: "feedback-container" }, hAsync("p", { ref: (el) => this.noMessageRef = el, tabindex: "-1" }, "To ", hAsync("strong", null, "help us improve"), ", we'd like to know more about your visit. Please ", hAsync("a", { href: "https://www.library.upenn.edu/contact-us" }, "contact us with your feedback"), ".")));
|
|
4259
|
-
}
|
|
4260
|
-
return (hAsync("div", { class: "feedback-container" }, hAsync("h2", null, FEEDBACK_QUESTION), hAsync("button", { onClick: () => this.handleFeedback('yes') }, "\uD83D\uDC4D", hAsync("span", null, "Yes", hAsync("span", { class: "visually-hidden" }, ", I found what I need."))), hAsync("button", { onClick: () => this.handleFeedback('no') }, "\uD83D\uDC4E", hAsync("span", null, "No", hAsync("span", { class: "visually-hidden" }, ", I didn't find what I need.")))));
|
|
4258
|
+
return (hAsync("div", { key: '04053c96e964ee9f240ca1a77d7944ae0f53248d', class: "feedback__container" }, hAsync("div", { key: 'f5f524b449d3473c1ecc2d454787034c54a811a0', class: "viewport-margins" }, hAsync("div", { key: 'd0c832edc9361dac49d9cbfc143332fea04434ea', class: "feedback__content" }, !this.hideQuestion && (this.answer === 'yes' ? (hAsync("p", null, "Thank you for letting us know.")) : this.answer === 'no' ? (hAsync("p", null, "Thank you for letting us know. ", hAsync("a", { href: "https://www.library.upenn.edu/contact-us" }, "Contact us"), " if you need help.")) : (hAsync("div", { class: "feedback__inline-question" }, hAsync("h2", null, "Did you find what you need?"), hAsync("button", { onClick: () => this.handleFeedback('yes') }, hAsync("span", null, "Yes")), hAsync("button", { onClick: () => this.handleFeedback('no') }, hAsync("span", null, "No"))))), hAsync("div", { key: '9630ad5e35d6eea2ee63217410607eb50c3babc7', class: "feedback__share-feedback" }, hAsync("p", { key: '126aeabf45f338cc07b33ebca09c761611e7c8e1' }, "To help us improve, ", hAsync("a", { key: '8af38aed071ad75d60837a18845d28e5645c2768', href: "http://library.upenn.edu/feedback" }, "share your feedback"), "."))))));
|
|
4261
4259
|
}
|
|
4262
4260
|
static get style() { return pennlibsFeedbackCss; }
|
|
4263
4261
|
static get cmpMeta() { return {
|
|
4264
4262
|
"$flags$": 265,
|
|
4265
4263
|
"$tagName$": "pennlibs-feedback",
|
|
4266
4264
|
"$members$": {
|
|
4265
|
+
"hideQuestion": [4, "hide-question"],
|
|
4267
4266
|
"error": [32],
|
|
4268
4267
|
"answer": [32]
|
|
4269
4268
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@penn-libraries/web",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0-dev.1",
|
|
4
4
|
"description": "Reusable web designs for University of Pennsylvania Libraries websites. This package contains our code for shared Web Components and Cascading Style Sheets (CSS).",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|