@penn-libraries/web 1.3.1 → 1.4.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.
Files changed (78) hide show
  1. package/dist/cjs/{index-BZwAUTFd.js → index-DATEsMXP.js} +19 -4
  2. package/dist/cjs/index-DATEsMXP.js.map +1 -0
  3. package/dist/cjs/index.cjs.js +1 -1
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/pennlibs-autocomplete.cjs.entry.js +1 -1
  6. package/dist/cjs/pennlibs-banner.cjs.entry.js +1 -1
  7. package/dist/cjs/pennlibs-chat.cjs.entry.js +1 -1
  8. package/dist/cjs/pennlibs-expand-text.pennlibs-feedback.pennlibs-footer.pennlibs-header.entry.cjs.js.map +1 -0
  9. package/dist/cjs/{pennlibs-feedback_3.cjs.entry.js → pennlibs-expand-text_4.cjs.entry.js} +81 -8
  10. package/dist/cjs/pennlibs-fallback-img.cjs.entry.js +2 -2
  11. package/dist/cjs/pennlibs-hero.cjs.entry.js +3 -3
  12. package/dist/cjs/pennlibs-hero.entry.cjs.js.map +1 -1
  13. package/dist/cjs/pennlibs-iiif-img.cjs.entry.js +1 -1
  14. package/dist/cjs/web.cjs.js +2 -2
  15. package/dist/collection/collection-manifest.json +1 -0
  16. package/dist/collection/components/pennlibs-expand-text/pennlibs-expand-text.css +88 -0
  17. package/dist/collection/components/pennlibs-expand-text/pennlibs-expand-text.js +168 -0
  18. package/dist/collection/components/pennlibs-expand-text/pennlibs-expand-text.js.map +1 -0
  19. package/dist/collection/components/pennlibs-fallback-img/pennlibs-fallback-img.js +1 -1
  20. package/dist/collection/components/pennlibs-feedback/pennlibs-feedback.js +1 -1
  21. package/dist/collection/components/pennlibs-footer/pennlibs-footer.css +1 -1
  22. package/dist/collection/components/pennlibs-footer/pennlibs-footer.js +3 -3
  23. package/dist/collection/components/pennlibs-header/pennlibs-header.js +1 -1
  24. package/dist/collection/components/pennlibs-hero/pennlibs-hero.css +5 -10
  25. package/dist/collection/components/pennlibs-hero/pennlibs-hero.js +1 -1
  26. package/dist/components/index.d.ts +2 -0
  27. package/dist/components/index.js +1 -0
  28. package/dist/components/index.js.map +1 -1
  29. package/dist/components/pennlibs-expand-text.d.ts +11 -0
  30. package/dist/components/pennlibs-expand-text.js +105 -0
  31. package/dist/components/pennlibs-expand-text.js.map +1 -0
  32. package/dist/components/pennlibs-fallback-img2.js +1 -1
  33. package/dist/components/pennlibs-feedback.js +1 -1
  34. package/dist/components/pennlibs-footer.js +4 -4
  35. package/dist/components/pennlibs-footer.js.map +1 -1
  36. package/dist/components/pennlibs-header.js +1 -1
  37. package/dist/components/pennlibs-hero.js +2 -2
  38. package/dist/components/pennlibs-hero.js.map +1 -1
  39. package/dist/docs.json +130 -1
  40. package/dist/{web/p-DF84VN1-.js → esm/index-CgmxDHmi.js} +19 -5
  41. package/dist/esm/index-CgmxDHmi.js.map +1 -0
  42. package/dist/esm/index.js +1 -1
  43. package/dist/esm/loader.js +3 -3
  44. package/dist/esm/pennlibs-autocomplete.entry.js +1 -1
  45. package/dist/esm/pennlibs-banner.entry.js +1 -1
  46. package/dist/esm/pennlibs-chat.entry.js +1 -1
  47. package/dist/esm/pennlibs-expand-text.pennlibs-feedback.pennlibs-footer.pennlibs-header.entry.js.map +1 -0
  48. package/dist/esm/{pennlibs-feedback_3.entry.js → pennlibs-expand-text_4.entry.js} +81 -9
  49. package/dist/esm/pennlibs-fallback-img.entry.js +2 -2
  50. package/dist/esm/pennlibs-hero.entry.js +3 -3
  51. package/dist/esm/pennlibs-hero.entry.js.map +1 -1
  52. package/dist/esm/pennlibs-iiif-img.entry.js +1 -1
  53. package/dist/esm/web.js +3 -3
  54. package/dist/types/components/pennlibs-expand-text/pennlibs-expand-text.d.ts +35 -0
  55. package/dist/types/components.d.ts +69 -0
  56. package/dist/web/index.esm.js +1 -1
  57. package/dist/web/{p-fc772aef.entry.js → p-2d7c03b3.entry.js} +3 -3
  58. package/dist/web/{p-17a97fcf.entry.js → p-6eef97ad.entry.js} +1 -1
  59. package/dist/web/{p-c978cff4.entry.js → p-6ff0271c.entry.js} +1 -1
  60. package/dist/web/{p-4d671d86.entry.js → p-7c1febd2.entry.js} +1 -1
  61. package/dist/{esm/index-DF84VN1-.js → web/p-CgmxDHmi.js} +19 -5
  62. package/dist/web/p-CgmxDHmi.js.map +1 -0
  63. package/dist/web/{p-dc790d88.entry.js → p-b674bdca.entry.js} +2 -2
  64. package/dist/web/{p-15aaa482.entry.js → p-eda436e7.entry.js} +1 -1
  65. package/dist/web/{p-f797c7a7.entry.js → p-ee89e08f.entry.js} +81 -9
  66. package/dist/web/pennlibs-expand-text.pennlibs-feedback.pennlibs-footer.pennlibs-header.entry.esm.js.map +1 -0
  67. package/dist/web/pennlibs-hero.entry.esm.js.map +1 -1
  68. package/dist/web/web.css +9 -1
  69. package/dist/web/web.esm.js +3 -3
  70. package/hydrate/index.js +119 -10
  71. package/hydrate/index.mjs +119 -10
  72. package/package.json +1 -1
  73. package/dist/cjs/index-BZwAUTFd.js.map +0 -1
  74. package/dist/cjs/pennlibs-feedback.pennlibs-footer.pennlibs-header.entry.cjs.js.map +0 -1
  75. package/dist/esm/index-DF84VN1-.js.map +0 -1
  76. package/dist/esm/pennlibs-feedback.pennlibs-footer.pennlibs-header.entry.js.map +0 -1
  77. package/dist/web/p-DF84VN1-.js.map +0 -1
  78. package/dist/web/pennlibs-feedback.pennlibs-footer.pennlibs-header.entry.esm.js.map +0 -1
@@ -113,7 +113,7 @@
113
113
  display: inline-block;
114
114
  padding: 0.5em 0.75em;
115
115
  font-size: 0.875em;
116
- opacity: 0.875;
116
+ opacity: 0.75;
117
117
  font-weight: 500;
118
118
  }
119
119
 
@@ -54,12 +54,12 @@ export class Footer {
54
54
  }
55
55
  render() {
56
56
  const footerBackgroundSrc = getAssetPath('./assets/footer-bg.webp');
57
- return (h("footer", { key: '39b1bc7336fe2aa28e8c6093d13b8dfb3dd70d3e', class: "website-footer-wrapper" }, h("div", { key: '7902cf7cde3a468dec8ea71c2a139addafa5af79', class: "website-footer", style: {
57
+ return (h("footer", { key: '15d1f4477bd137e281fcbf6c1e3b70bf55a8a2e0', class: "website-footer-wrapper" }, h("div", { key: '04954e3b1095b6d510e1bae4e5a453f6ff5cb0ce', class: "website-footer", style: {
58
58
  background: `var(--pl-color-penn-blue) url(${footerBackgroundSrc}) no-repeat 50% 50%`,
59
59
  backgroundSize: 'cover',
60
- } }, h("div", { key: '804f9cd3f101997ee2d15d4a4749945ef553a118', class: "viewport-margins" }, h("div", { key: '3a09637400e74e729641666eb8142c0cf77d66b3', class: "website-footer__content" }, h("div", { key: 'cdb9270db298aa7781859a80c799949cb4c35787', class: "website-footer__links-container" }, h("section", { key: '20d953d2b85178798d2298aa8aaa9fb8e47d7af4' }, h("h2", { key: '79b1fe7f4fc2dff03134c7d4e96e9fd657131fc8', class: "website-footer__heading" }, "Penn Libraries"), h("ul", { key: 'ba8002b17457f979f9817c45a89f332064f0b5bb', class: "website-footer__links" }, h("li", { key: 'cb65fc4ad6432ef447a4b98a8dfdc0323bf37ccc' }, h("a", { key: '0b61506da9a1c18919f77410fa39d3937f7485df', href: "https://maps.google.com/?q=Van Pelt Library 3420 Walnut Street, Philadelphia, PA 19104-6206" }, "3420 Walnut Street", h("br", { key: 'ebd3def13a3107d1b301c0932d421b054e2bb338' }), "Philadelphia, PA 19104-6206")), h("li", { key: '3f26ebab3b90a33ba2d17cd3cfd8a485f1c7e74f' }, h("a", { key: 'c2dcf7a3d936eb5376b2568e677bb8a7dc7ab445', href: "tel:(215) 898-7566" }, "(215) 898-7566")), h("li", { key: '8c9374110f2d386c7275fad9522ea2565daf6c06' }, h("a", { key: 'd40a2fd7490f1b233e4839e38faf29d9bb04f519', href: "https://www.library.upenn.edu/contact-us" }, "Contact us")), h("li", { key: 'ab3016b1cfcc8827af060ec383d8556e8346713a' }, h("a", { key: '76a8d246128fb76606c1cdf24640198c23c9d317', href: "https://www.library.upenn.edu/about/hours", target: "_blank" }, "Locations and hours")))), h("section", { key: 'fd0abacbc35ffaafbb2016064c7a6194616ee2dc' }, h("h2", { key: 'a812d7d26e21a1808ce6bd115ec620e1b033a8bf', class: "website-footer__heading" }, "Stay in touch"), h("ul", { key: 'fe158ff1336379e1236a88c4a3d0f5e1efd9cdb8', class: "website-footer__links" }, h("li", { key: '32396df360b39190ff587400fabe405ee319a507' }, h("a", { key: '07ac56362dde7a2807e86c2a22564689ed9de90c', href: "https://www.alumni.upenn.edu/libsignup" }, "Newsletter")), h("li", { key: '95abd2bf0f6a79c0597c1e57e878f986002adde2' }, h("a", { key: '374044fae62fd82c9369cfba8b7c6223ded48d5a', href: "https://www.instagram.com/upennlib/" }, "Instagram")), h("li", { key: '86cc74d4ec21dfb51a072cfad87ed395e961f26f' }, h("a", { key: 'fda9e8c73918252b91e40dc23d289613a3fe5802', href: "https://www.facebook.com/PennLibraries/" }, "Facebook")), h("li", { key: 'b1ce60d7aa5ac8a2aa8bd4f826c11cc753b1488c' }, h("a", { key: 'ccfef8131fc7f9edd44936f1c212d31c08c61682', href: "https://www.linkedin.com/company/penn-libraries" }, "LinkedIn")))), this.navigationByChildren && [
60
+ } }, h("div", { key: 'ba8ce4e14e0e9364863fac7a2839397e2e0b941a', class: "viewport-margins" }, h("div", { key: '63f34d4f96b284e724135ed8987cc2d3d2e3fbd1', class: "website-footer__content" }, h("div", { key: 'a1edf943618100610c6624d35193fc9f0f5968b3', class: "website-footer__links-container" }, h("section", { key: 'c7f7f781d1c6b239d520a8dc725381aec6281b8a' }, h("h2", { key: 'dc87452564eb1c1c1e75105ec8195917f7eb97a2', class: "website-footer__heading" }, "Penn Libraries"), h("ul", { key: '8510d8d758daee5d1c08bdbebf2fd741f6bc3b29', class: "website-footer__links" }, h("li", { key: '5975b1488a02111e692fd80e86db0f72baa4d9d3' }, h("a", { key: '2715c1c9c7a0f2ad1d677906eb5a34ab4c04007c', href: "https://maps.google.com/?q=Van Pelt Library 3420 Walnut Street, Philadelphia, PA 19104-6206" }, "3420 Walnut Street", h("br", { key: '4d380fd2e056d972944a3866ebc52e25689cd44c' }), "Philadelphia, PA 19104-6206")), h("li", { key: '3d52db897689c923b85c67159f8c53ca346e98c2' }, h("a", { key: '1010c1d279e1cb11c7a853f0997b5d8aabd33bdc', href: "tel:(215) 898-7566" }, "(215) 898-7566")), h("li", { key: 'f1d61d6e01c5e2a1fced55e145f101ccc37fdf29' }, h("a", { key: 'f1dc654a1af81a5847aef7c9fc21e025eb8dfced', href: "https://www.library.upenn.edu/contact-us" }, "Contact us")), h("li", { key: '1c96e99267b30a59b65f4e3d726ef948be202d2d' }, h("a", { key: '02c308d0c96d6148ca093e5e0882d5d22aa9c1db', href: "https://www.library.upenn.edu/about/hours", target: "_blank" }, "Locations and hours")))), h("section", { key: '639a1f5a03b1f646b8a519fa4749980512524f33' }, h("h2", { key: 'e8047c4763458e63d20c4dddd6a35dd6f144c016', class: "website-footer__heading" }, "Stay in touch"), h("ul", { key: 'd496f8fbea5a6c8a9d705c90588b6f750f4a8609', class: "website-footer__links" }, h("li", { key: '57d3280c71d8dcf57db397641c9418910cd4cb84' }, h("a", { key: 'c3203a8e36919031b5a14958765ad05c5e590e50', href: "https://www.alumni.upenn.edu/libsignup" }, "Newsletter")), h("li", { key: '0025893e79dc5fde2a86c8305ff57bd7a4bd5962' }, h("a", { key: '4f20f07275a082c43e3dfdbf23b42487d0cc94da', href: "https://www.instagram.com/upennlib/" }, "Instagram")), h("li", { key: '7d6e64d3f6d921e7967b9eea4f307cba5a3c326d' }, h("a", { key: 'b145fc5809b8f2a8225351bd69296da5f803756d', href: "https://www.facebook.com/PennLibraries/" }, "Facebook")), h("li", { key: '471174a0eede78d94704c00d28284cfafc0553e9' }, h("a", { key: '031b7d1aad9f6c27a2898c57cab0b2909d5acc78', href: "https://www.linkedin.com/company/penn-libraries" }, "LinkedIn")))), this.navigationByChildren && [
61
61
  this.navigationByChildren.map(section => (h("section", null, h("h2", { class: "website-footer__heading" }, section.heading), h("ul", { class: "website-footer__links" }, section.links.map(link => (h("li", null, h("a", { href: link.href }, link.label))))))))
62
- ]))), h("div", { key: '4430d39b9b8943d9336020d5ed04cdb80a3b91af', class: "website-footer__footer" }, h("div", { key: '437f0b8894b63c3857f8871eaaaf3d28277738ad', class: "viewport-margins" }, h("ul", { key: '8c4ac37a89006d543a66c8c1ba6bc9d7acc0d6db', class: "website-footer__links website-footer__links--footer" }, h("li", { key: 'ac1db31f3c5331a26c0aee171974c10f22d5da08' }, h("a", { key: 'ad8a6251cca9b0c904ccecff96a8800b22ed5568', href: "https://www.upenn.edu/" }, "UPenn")), h("li", { key: '1189f7119ec768d34ea9435f9ff85df2764abe61' }, h("a", { key: 'eb53d4f15fe49d32899d435670a34369a4e7e190', href: "https://www.upenn.edu/about/privacy-policy" }, "Privacy Policy")), h("li", { key: 'd2a155f7f91a31cca41df9d0c9d37f151bded247' }, h("a", { key: '8e329a895a25bd139867063dd7eed9c0aa7c0060', href: "https://accessibility.web-resources.upenn.edu/get-help" }, "Report Accessibility Issues and Get Help")), h("li", { key: '0b65f3da18b54b91158515d7966e010e4e0d64ac' }, h("a", { key: 'f8615c438f94216372fdb8afa26ae7150bbef816', href: "https://www.upenn.edu/about/disclaimer" }, "Disclaimer")), h("li", { key: 'cbf5febfb926a1b569e73d4a57e7ca8315f6d876' }, h("a", { key: '1116c792623c0fa819ce0189e105ee54c69ba73e', href: "https://www.publicsafety.upenn.edu/contact/" }, "Emergency Services")), h("li", { key: '385a84f264b263a9738d38d66ac917e3a6055db4' }, h("a", { key: 'dcd8517fb32ae46b983cb4802adb86e33e29bd71', href: "https://www.upenn.edu/about/report-copyright-infringement" }, "Report Copyright Infringement")))))), this.showBuiltWith && (h("div", { key: 'd3bca43144b06b50091b54dee5c8734de4f80d60', class: "viewport-margins" }, h("p", { key: 'a3d974ea56f521406bffc2a8eaf6b6e6c57bb595', class: "built-with" }, "Built with the ", h("a", { key: '7aa9fc3901510e0ad7d2b0ca4abf4f8c6f92d735', href: "https://designsystem.library.upenn.edu/" }, "Penn Libraries Design System"), ".")))));
62
+ ]))), h("div", { key: '5ac97b0c44a303ceeb84c88a5da2c7a5417afa55', class: "website-footer__footer" }, h("div", { key: '281481bf6d25945607e1431f634a9f6649b72300', class: "viewport-margins" }, h("ul", { key: '8e4626896cd9dd360eebe55df9f8eb98d485045e', class: "website-footer__links website-footer__links--footer" }, h("li", { key: '021025b20149e8f53e17cf4df1f76a2d9045a52c' }, h("a", { key: '95bd80578f001c06f273800ee9b26c2069c8822c', href: "https://www.upenn.edu/" }, "UPenn")), h("li", { key: 'be940d241e15c85f07ec8f229e4683ccbaf077e4' }, h("a", { key: '1e8db44efbe98e135495240a42e6e74a3829c665', href: "https://www.upenn.edu/about/privacy-policy" }, "Privacy Policy")), h("li", { key: '14a7fb2dfdc4fe417fc66ae05b0e30db13739913' }, h("a", { key: '1e572fd1b6c7c48225a65ef58c1f4cdb2f67afd6', href: "https://accessibility.web-resources.upenn.edu/get-help" }, "Report Accessibility Issues and Get Help")), h("li", { key: '1aeecdc1384586c45ea1500e2a908a0bde97668e' }, h("a", { key: '9e94479dd864300421900e0e9fe4fbb3251d7524', href: "https://www.upenn.edu/about/disclaimer" }, "Disclaimer")), h("li", { key: 'a9d5ce618f8ed4ff4e8360dc11568b067f66101c' }, h("a", { key: '384f77c47f7d28b99fe9fbbf707948a180d973f1', href: "https://www.publicsafety.upenn.edu/contact/" }, "Emergency Services")), h("li", { key: 'a203f0efeea4cfd5275cdee380c12bb9d7e04a38' }, h("a", { key: 'a51d4b482d562aca31ff9b97703950562604ad48', href: "https://www.upenn.edu/about/report-copyright-infringement" }, "Report Copyright Infringement")))))), this.showBuiltWith && (h("div", { key: '43f89da940afef08331d12e2991fa24220afce99', class: "viewport-margins" }, h("p", { key: '25863d379ecb9e7f46186858974a71e150188015', class: "built-with" }, "Built with the ", h("a", { key: '427150399d8b81e090315c01446452f2142bab63', href: "https://designsystem.library.upenn.edu/" }, "Penn Libraries Design System"), ".")))));
63
63
  }
64
64
  static get is() { return "pennlibs-footer"; }
65
65
  static get encapsulation() { return "shadow"; }
@@ -63,7 +63,7 @@ export class Header {
63
63
  return (h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24", viewBox: "0 -960 960 960", width: "24" }, h("path", { fill: "currentColor", d: "M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z" })));
64
64
  }
65
65
  render() {
66
- return (h("header", { key: '6d14c72db0c06f38d66927f3f3102b7db82c1317', class: `viewport-margins website-header ${this.theme === 'dark' && 'website-header--dark'}` }, h("div", { key: 'f7411c48f1f5ba8d267eb53cba7adb3d41c74aec', class: "website-header__inner-container" }, h("div", { key: '78be403367c64beaf5b4cdceac458efc0007980e', class: "website-header__logo-name-container" }, h("a", { key: '8b3e0da246ea69744b83debb0b5e23e271a64520', href: "https://www.library.upenn.edu/", class: "website-header_logo-link", "aria-label": "Penn Libraries" }, this.theme === 'dark' ? h(LogoWhite, null) : h(LogoBlue, null)), this.serviceName && (h("a", { key: '1e1208fd657497dac0f3bb8a09d6b8e8507d2d04', href: "/", class: "website-header__service-link" }, h("span", { key: '33a0c53e36a064a999025eeeae5d3bab9bca11bc', class: "website-header__service-name" }, this.serviceName), this.serviceLede && h("span", { key: '809ca2fdb42dbc35a80474a0e06a39bbba5fb675', class: "website-header__service-lede" }, this.serviceLede))), h("slot", { key: '91cfd1e15bd1e7de19a418d0bc05095fd634870b', name: "name-end" })), this.navigation.length > 0 && (h("nav", { key: 'ce1c1d9fb21fa12b81fb17f9204885c27f86e380', class: "website-header__navigation" }, h("button", { key: 'bdefe1220e526611c7ff9ef9f46be67028077263', class: "website-header__navigation-button", "aria-expanded": `${this.isMenuOpen}`, onClick: () => this.handleToggleMenu() }, this.renderMenuIcon(), " Menu"), this.navigation && (h("ol", { key: '0af8e80d1ba55d267037e28d18caa03714600b22', class: `website-header__navigation-list ${this.isMenuOpen && 'website-header__navigation-list--visible'}` }, this.navigation.map(element => h("li", { innerHTML: element.outerHTML })))))), h("slot", { key: '605d0e5b7caba6cdebf98ace0d708453ab0c4b0f', name: "end" }))));
66
+ return (h("header", { key: '5b9d608f76d32ea50d377d251c2c2153a53b1875', class: `viewport-margins website-header ${this.theme === 'dark' && 'website-header--dark'}` }, h("div", { key: 'b15e4a006b6a29f671df20e8bb65d2e9e71c25f3', class: "website-header__inner-container" }, h("div", { key: '5c3e13c63b317a44dee3b07c2dbcbdc4e33fb40a', class: "website-header__logo-name-container" }, h("a", { key: 'aa2d4a9b55fe73eac1b433da51db7e70c2a9100d', href: "https://www.library.upenn.edu/", class: "website-header_logo-link", "aria-label": "Penn Libraries" }, this.theme === 'dark' ? h(LogoWhite, null) : h(LogoBlue, null)), this.serviceName && (h("a", { key: 'bff559907d2e26bb2e9f055645a68d7b35558ef5', href: "/", class: "website-header__service-link" }, h("span", { key: '30376d9a13d24c78dd10f11c74acc017bb7ef9ee', class: "website-header__service-name" }, this.serviceName), this.serviceLede && h("span", { key: '6bb01b158d0205a4d534b186379c0e00cb1cb076', class: "website-header__service-lede" }, this.serviceLede))), h("slot", { key: 'bff814b020b3a7c4eee900c19a871e47bebbfac7', name: "name-end" })), this.navigation.length > 0 && (h("nav", { key: 'f1949adb87868902885d65a65504f4ee4eb9c799', class: "website-header__navigation" }, h("button", { key: '7cd866c7dfb52caa705a74c8af5bba443c55257e', class: "website-header__navigation-button", "aria-expanded": `${this.isMenuOpen}`, onClick: () => this.handleToggleMenu() }, this.renderMenuIcon(), " Menu"), this.navigation && (h("ol", { key: '84270b993db01e2c46ce8a94be6c61a95c59f40a', class: `website-header__navigation-list ${this.isMenuOpen && 'website-header__navigation-list--visible'}` }, this.navigation.map(element => h("li", { innerHTML: element.outerHTML })))))), h("slot", { key: 'ff3234593474b8f5a63836a6f519d85a5fe73ba2', name: "end" }))));
67
67
  }
68
68
  static get is() { return "pennlibs-header"; }
69
69
  static get encapsulation() { return "shadow"; }
@@ -37,6 +37,9 @@
37
37
  background-repeat: no-repeat;
38
38
  background-position: 50% 33%;
39
39
  display: flex;
40
+ /* Establish a container so .hero__heading can scale fluidly with the
41
+ hero's own width via `cqi` units. */
42
+ container-type: inline-size;
40
43
  }
41
44
  /* End of Selection */
42
45
 
@@ -80,7 +83,9 @@
80
83
  .hero__heading {
81
84
  text-shadow: 1px 1px 2px var(--pl-color-fg-default);
82
85
  line-height: 1;
86
+ /* Fallback for browsers that don't parse `cqi`. */
83
87
  font-size: var(--pl-font-size-5xl);
88
+ font-size: clamp(var(--pl-font-size-4xl), 3cqi + 1rem, var(--pl-font-size-5xl));
84
89
  font-weight: 400;
85
90
  font-family: var(--pl-hero-heading-font);
86
91
  text-wrap: pretty;
@@ -89,12 +94,6 @@
89
94
  color: var(--pl-hero-color);
90
95
  }
91
96
 
92
- @media (max-width: 920px) {
93
- .hero__heading {
94
- font-size: var(--pl-font-size-4xl);
95
- }
96
- }
97
-
98
97
  .hero__sub-heading {
99
98
  font-size: 1.25em;
100
99
  font-family: var(--pl-font-family);
@@ -122,10 +121,6 @@
122
121
  }
123
122
 
124
123
  @media (max-width: 620px) {
125
- .hero__heading {
126
- font-size: 2.75em;
127
- }
128
-
129
124
  .hero__sub-heading {
130
125
  font-size: 1em;
131
126
  }
@@ -51,7 +51,7 @@ export class Hero {
51
51
  }
52
52
  }
53
53
  render() {
54
- return (h("div", { key: 'd05bbd0346ad50b3e0f3264b8263bcf54534adb5', class: "hero", style: { backgroundImage: `url(${this.heroSrc})` } }, h("div", { key: 'd1016edd7705c437ee065e5bb355840bd9907bcb', class: "hero__content" }, h("slot", { key: '89d03122b810c823516912236b899a0b77d62af7', name: "start" }), h("div", { key: '723cc18e93c02990028d7f7f19afc8b861afa0f2', class: "hero__heading-container" }, this.heroHeadingElement && (h("div", { key: 'bc634a22c4de25b7780b8d46bb1bf91cb50000be', class: "viewport-margins" }, h("h1", { key: '307269e0a116a254b2dc94009fdbf5679a0e169d', class: "hero__heading", innerHTML: this.heroHeadingElement.innerText }), this.heroParagraphElement && h("p", { key: '3258869e6449257d517312cedc4b7749deaaaf0f', class: "hero__sub-heading", innerHTML: this.heroParagraphElement.innerHTML })))))));
54
+ return (h("div", { key: '4234b8c7129b9ad562e979a62124bb8b059f4906', class: "hero", style: { backgroundImage: `url(${this.heroSrc})` } }, h("div", { key: '48e60ea4da5432ca67ad355d79043fdefc9f916f', class: "hero__content" }, h("slot", { key: 'f08f58488b758cb0a5fe88d8c05b37fda2332ca4', name: "start" }), h("div", { key: '17a6b7a12512779048dcfa5ef68f58be34743541', class: "hero__heading-container" }, this.heroHeadingElement && (h("div", { key: 'e059b09f3797425587c268e714e605f8abdd20d7', class: "viewport-margins" }, h("h1", { key: '152d036ee2d7838c6faa072c0ea795c31ea7b120', class: "hero__heading", innerHTML: this.heroHeadingElement.innerText }), this.heroParagraphElement && h("p", { key: 'e942105a04ab4e75a502dbd19d5f465efb2acb18', class: "hero__sub-heading", innerHTML: this.heroParagraphElement.innerHTML })))))));
55
55
  }
56
56
  static get is() { return "pennlibs-hero"; }
57
57
  static get encapsulation() { return "shadow"; }
@@ -5,6 +5,8 @@ export { Banner as PennlibsBanner } from '../types/components/pennlibs-banner/pe
5
5
  export { defineCustomElement as defineCustomElementPennlibsBanner } from './pennlibs-banner';
6
6
  export { Chat as PennlibsChat } from '../types/components/pennlibs-chat/pennlibs-chat';
7
7
  export { defineCustomElement as defineCustomElementPennlibsChat } from './pennlibs-chat';
8
+ export { ExpandText as PennlibsExpandText } from '../types/components/pennlibs-expand-text/pennlibs-expand-text';
9
+ export { defineCustomElement as defineCustomElementPennlibsExpandText } from './pennlibs-expand-text';
8
10
  export { NoImage as PennlibsFallbackImg } from '../types/components/pennlibs-fallback-img/pennlibs-fallback-img';
9
11
  export { defineCustomElement as defineCustomElementPennlibsFallbackImg } from './pennlibs-fallback-img';
10
12
  export { PennlibsFeedback as PennlibsFeedback } from '../types/components/pennlibs-feedback/pennlibs-feedback';
@@ -2,6 +2,7 @@ export { getAssetPath, render, setAssetPath, setNonce, setPlatformOptions } from
2
2
  export { PennlibsAutocomplete, defineCustomElement as defineCustomElementPennlibsAutocomplete } from './pennlibs-autocomplete.js';
3
3
  export { PennlibsBanner, defineCustomElement as defineCustomElementPennlibsBanner } from './pennlibs-banner.js';
4
4
  export { PennlibsChat, defineCustomElement as defineCustomElementPennlibsChat } from './pennlibs-chat.js';
5
+ export { PennlibsExpandText, defineCustomElement as defineCustomElementPennlibsExpandText } from './pennlibs-expand-text.js';
5
6
  export { PennlibsFallbackImg, defineCustomElement as defineCustomElementPennlibsFallbackImg } from './pennlibs-fallback-img.js';
6
7
  export { PennlibsFeedback, defineCustomElement as defineCustomElementPennlibsFeedback } from './pennlibs-feedback.js';
7
8
  export { PennlibsFooter, defineCustomElement as defineCustomElementPennlibsFooter } from './pennlibs-footer.js';
@@ -1 +1 @@
1
- {"file":"index.js","mappings":";;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
1
+ {"file":"index.js","mappings":";;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface PennlibsExpandText extends Components.PennlibsExpandText, HTMLElement {}
4
+ export const PennlibsExpandText: {
5
+ prototype: PennlibsExpandText;
6
+ new (): PennlibsExpandText;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,105 @@
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+
3
+ const pennlibsExpandTextCss = ":host{display:inline-block;position:relative;max-width:100%;vertical-align:bottom}.expand-text{display:block}.expand-text--clamped{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--pl-expand-text-lines, 3);line-clamp:var(--pl-expand-text-lines, 3);overflow:hidden}.expand-text--expanded{display:inline}.expand-text__fade{position:absolute;right:0;bottom:0;padding-left:2em;background:linear-gradient(\n to right,\n transparent,\n var(--pl-expand-text-bg, var(--pl-color-bg-default)) 1.5em\n );pointer-events:none}.expand-text__toggle{display:inline-block;vertical-align:baseline;pointer-events:auto;padding:var(--pl-space-3xs) var(--pl-space-s);border:none;background:var(--pl-color-bg-subtle);color:var(--pl-color-fg-default);font-family:var(--pl-font-family);border-radius:var(--pl-border-radius-subtle);font-size:var(--pl-font-size-xs);font-weight:500;line-height:1.5;letter-spacing:0.075rem;text-transform:uppercase;cursor:pointer}.expand-text__toggle:hover{text-decoration:underline;text-decoration-thickness:var(--pl-link-text-decoration-thickness);text-underline-offset:var(--pl-link-text-underline-offset)}.expand-text__toggle:focus-visible{outline:none;box-shadow:var(--pl-focus-box-shadow)}.expand-text__fade--inline{position:static;padding-left:0;background:none;margin-inline-start:var(--pl-space-2xs, 0.25rem)}";
4
+
5
+ const ExpandText = /*@__PURE__*/ proxyCustomElement(class ExpandText extends HTMLElement {
6
+ constructor(registerHost) {
7
+ super();
8
+ if (registerHost !== false) {
9
+ this.__registerHost();
10
+ }
11
+ this.__attachShadow();
12
+ /**
13
+ * Maximum number of lines to show before truncating.
14
+ * @prop lines
15
+ */
16
+ this.lines = 3;
17
+ /**
18
+ * Label for the toggle when content is collapsed.
19
+ * @prop expand-label
20
+ */
21
+ this.expandLabel = 'More';
22
+ /**
23
+ * Label for the toggle when content is expanded.
24
+ * @prop collapse-label
25
+ */
26
+ this.collapseLabel = 'Less';
27
+ this.expanded = false;
28
+ this.hasOverflow = false;
29
+ this.measured = false;
30
+ this.checkOverflow = () => {
31
+ if (!this.contentEl || this.expanded)
32
+ return;
33
+ const lineHeight = parseFloat(getComputedStyle(this.contentEl).lineHeight);
34
+ if (Number.isFinite(lineHeight) && this.lines > 0) {
35
+ // Require at least two full extra lines of hidden content before the
36
+ // toggle is worth showing. A near-flush overflow (a few extra words)
37
+ // makes the toggle look like it reveals nothing meaningful.
38
+ this.hasOverflow = this.contentEl.scrollHeight > lineHeight * (this.lines + 2);
39
+ }
40
+ else {
41
+ this.hasOverflow = this.contentEl.scrollHeight > this.contentEl.clientHeight + 1;
42
+ }
43
+ this.measured = true;
44
+ };
45
+ this.toggle = () => {
46
+ this.expanded = !this.expanded;
47
+ };
48
+ }
49
+ componentDidLoad() {
50
+ var _a;
51
+ if (!this.contentEl)
52
+ return;
53
+ // Observe the host (always inline-block) rather than the content span,
54
+ // which becomes inline when unclamped and stops firing resize events.
55
+ this.resizeObserver = new ResizeObserver(() => this.checkOverflow());
56
+ this.resizeObserver.observe(this.el);
57
+ this.checkOverflow();
58
+ (_a = document.fonts) === null || _a === void 0 ? void 0 : _a.ready.then(() => this.checkOverflow());
59
+ }
60
+ disconnectedCallback() {
61
+ var _a;
62
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
63
+ }
64
+ render() {
65
+ const isClamped = !this.expanded && (!this.measured || this.hasOverflow);
66
+ return (h(Host, { key: '9c1a5be21f67022923982179319c9b0920a3ee00', style: { '--pl-expand-text-lines': String(this.lines) } }, h("span", { key: '54b5721c9df1a81b08e3823b93029f72a8e66852', class: {
67
+ 'expand-text': true,
68
+ 'expand-text--clamped': isClamped,
69
+ 'expand-text--expanded': this.expanded,
70
+ }, ref: (el) => (this.contentEl = el) }, h("slot", { key: 'f4df852b0d1513741e07825551428807f8cb27c3' })), this.hasOverflow && (h("span", { key: '79104493f870c13070468612a7269072c9607779', class: {
71
+ 'expand-text__fade': true,
72
+ 'expand-text__fade--inline': this.expanded,
73
+ } }, h("button", { key: 'f723f0265093c78b45b4f3cb6d2fce2549361cdd', type: "button", class: "expand-text__toggle", "aria-expanded": String(this.expanded), onClick: this.toggle }, this.expanded ? this.collapseLabel : this.expandLabel)))));
74
+ }
75
+ get el() { return this; }
76
+ static get style() { return pennlibsExpandTextCss; }
77
+ }, [257, "pennlibs-expand-text", {
78
+ "lines": [2],
79
+ "expandLabel": [1, "expand-label"],
80
+ "collapseLabel": [1, "collapse-label"],
81
+ "expanded": [32],
82
+ "hasOverflow": [32],
83
+ "measured": [32]
84
+ }]);
85
+ function defineCustomElement$1() {
86
+ if (typeof customElements === "undefined") {
87
+ return;
88
+ }
89
+ const components = ["pennlibs-expand-text"];
90
+ components.forEach(tagName => { switch (tagName) {
91
+ case "pennlibs-expand-text":
92
+ if (!customElements.get(tagName)) {
93
+ customElements.define(tagName, ExpandText);
94
+ }
95
+ break;
96
+ } });
97
+ }
98
+
99
+ const PennlibsExpandText = ExpandText;
100
+ const defineCustomElement = defineCustomElement$1;
101
+
102
+ export { PennlibsExpandText, defineCustomElement };
103
+ //# sourceMappingURL=pennlibs-expand-text.js.map
104
+
105
+ //# sourceMappingURL=pennlibs-expand-text.js.map
@@ -0,0 +1 @@
1
+ {"file":"pennlibs-expand-text.js","mappings":";;AAAA,MAAM,qBAAqB,GAAG,s1CAAs1C;;MCcv2C,UAAU,iBAAAA,kBAAA,CAAA,MAAA,UAAA,SAAA,WAAA,CAAA;AALvB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;AAQE;;;AAGG;AACK,QAAA,IAAK,CAAA,KAAA,GAAW,CAAC;AAEzB;;;AAGG;AACK,QAAA,IAAW,CAAA,WAAA,GAAW,MAAM;AAEpC;;;AAGG;AACK,QAAA,IAAa,CAAA,aAAA,GAAW,MAAM;AAE7B,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AACzB,QAAA,IAAW,CAAA,WAAA,GAAY,KAAK;AAC5B,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAmB1B,QAAA,IAAa,CAAA,aAAA,GAAG,MAAK;AAC3B,YAAA,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,QAAQ;gBAAE;AACtC,YAAA,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC;AAC1E,YAAA,IAAI,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE;;;;AAIjD,gBAAA,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,GA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,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,aAAa,EAAE,IAAI;AACnB,gBAAA,sBAAsB,EAAE,SAAS;gBACjC,uBAAuB,EAAE,IAAI,CAAC,QAAQ;AACvC,aAAA,EACD,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,EAAA,EAElC,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACH,EACN,IAAI,CAAC,WAAW,KACf,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,mBAAmB,EAAE,IAAI;gBACzB,2BAA2B,EAAE,IAAI,CAAC,QAAQ;aAC3C,EAAA,EAED,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,qBAAqB,EACZ,eAAA,EAAA,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EACpC,OAAO,EAAE,IAAI,CAAC,MAAM,EAEnB,EAAA,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,WAAW,CAC/C,CACJ,CACR,CACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement"],"sources":["src/components/pennlibs-expand-text/pennlibs-expand-text.css?tag=pennlibs-expand-text&encapsulation=shadow","src/components/pennlibs-expand-text/pennlibs-expand-text.tsx"],"sourcesContent":[":host {\n display: inline-block;\n position: relative;\n max-width: 100%;\n vertical-align: bottom;\n}\n\n/* `block` so scrollHeight reports the full wrapped content height (inline\n spans don't, which breaks resize-based overflow detection). */\n.expand-text {\n display: block;\n}\n\n/* Clamping only applies when the JS measurement says the content meaningfully\n overflows. Pre-measurement, .expand-text--clamped is on by default so we\n don't flash the full text before clamping. Post-measurement, it stays on\n only if the threshold was hit; otherwise the content flows freely. */\n.expand-text--clamped {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: var(--pl-expand-text-lines, 3);\n line-clamp: var(--pl-expand-text-lines, 3);\n overflow: hidden;\n}\n\n/* When expanded, switch back to inline so the inline-flow fade button\n appears at the end of the text on the same line. */\n.expand-text--expanded {\n display: inline;\n}\n\n/* The fade wrapper inherits the parent's font-size and line-height (via\n the host), so its `1em` and `1lh` resolve against the parent. That gives\n us a line-box the height of one parent line, with a baseline at the\n right place for the inline-block toggle. */\n.expand-text__fade {\n position: absolute;\n right: 0;\n bottom: 0;\n padding-left: 2em;\n background:\n linear-gradient(\n to right,\n transparent,\n var(--pl-expand-text-bg, var(--pl-color-bg-default)) 1.5em\n );\n pointer-events: none;\n}\n\n.expand-text__toggle {\n /* Pill chip. inline-block + vertical-align: baseline aligns the toggle's\n text baseline to the parent's last-line baseline (via the fade's line-box). */\n display: inline-block;\n vertical-align: baseline;\n pointer-events: auto;\n padding: var(--pl-space-3xs) var(--pl-space-s);\n border: none;\n background: var(--pl-color-bg-subtle);\n color: var(--pl-color-fg-default);\n font-family: var(--pl-font-family);\n border-radius: var(--pl-border-radius-subtle);\n font-size: var(--pl-font-size-xs);\n font-weight: 500;\n line-height: 1.5;\n letter-spacing: 0.075rem;\n text-transform: uppercase;\n cursor: pointer;\n}\n\n.expand-text__toggle:hover {\n text-decoration: underline;\n text-decoration-thickness: var(--pl-link-text-decoration-thickness);\n text-underline-offset: var(--pl-link-text-underline-offset);\n}\n\n.expand-text__toggle:focus-visible {\n outline: none;\n box-shadow: var(--pl-focus-box-shadow);\n}\n\n/* When expanded, drop the fade out of absolute flow so the toggle appears\n inline at the end of the now-full text. */\n.expand-text__fade--inline {\n position: static;\n padding-left: 0;\n background: none;\n margin-inline-start: var(--pl-space-2xs, 0.25rem);\n}\n","import { Component, Prop, State, Element, Host, h } from '@stencil/core';\n\n/**\n * Clamp long text to a set number of lines with an inline \"More\" / \"Less\"\n * toggle. Useful for headings, descriptions, or any prose block that can\n * run long in narrow containers.\n *\n * @slot - The content to truncate. Accepts any flow content.\n */\n@Component({\n tag: 'pennlibs-expand-text',\n styleUrl: 'pennlibs-expand-text.css',\n shadow: true,\n})\nexport class ExpandText {\n @Element() el!: HTMLElement;\n\n /**\n * Maximum number of lines to show before truncating.\n * @prop lines\n */\n @Prop() lines: number = 3;\n\n /**\n * Label for the toggle when content is collapsed.\n * @prop expand-label\n */\n @Prop() expandLabel: string = 'More';\n\n /**\n * Label for the toggle when content is expanded.\n * @prop collapse-label\n */\n @Prop() collapseLabel: string = 'Less';\n\n @State() expanded: boolean = false;\n @State() hasOverflow: boolean = false;\n @State() measured: boolean = false;\n\n private contentEl?: HTMLElement;\n private resizeObserver?: ResizeObserver;\n\n componentDidLoad() {\n if (!this.contentEl) return;\n // Observe the host (always inline-block) rather than the content span,\n // which becomes inline when unclamped and stops firing resize events.\n this.resizeObserver = new ResizeObserver(() => this.checkOverflow());\n this.resizeObserver.observe(this.el);\n this.checkOverflow();\n document.fonts?.ready.then(() => this.checkOverflow());\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n }\n\n private checkOverflow = () => {\n if (!this.contentEl || this.expanded) return;\n const lineHeight = parseFloat(getComputedStyle(this.contentEl).lineHeight);\n if (Number.isFinite(lineHeight) && this.lines > 0) {\n // Require at least two full extra lines of hidden content before the\n // toggle is worth showing. A near-flush overflow (a few extra words)\n // makes the toggle look like it reveals nothing meaningful.\n this.hasOverflow = this.contentEl.scrollHeight > lineHeight * (this.lines + 2);\n } else {\n this.hasOverflow = this.contentEl.scrollHeight > this.contentEl.clientHeight + 1;\n }\n this.measured = true;\n };\n\n private toggle = () => {\n this.expanded = !this.expanded;\n };\n\n render() {\n const isClamped = !this.expanded && (!this.measured || this.hasOverflow);\n return (\n <Host style={{ '--pl-expand-text-lines': String(this.lines) }}>\n <span\n class={{\n 'expand-text': true,\n 'expand-text--clamped': isClamped,\n 'expand-text--expanded': this.expanded,\n }}\n ref={(el) => (this.contentEl = el)}\n >\n <slot />\n </span>\n {this.hasOverflow && (\n <span\n class={{\n 'expand-text__fade': true,\n 'expand-text__fade--inline': this.expanded,\n }}\n >\n <button\n type=\"button\"\n class=\"expand-text__toggle\"\n aria-expanded={String(this.expanded)}\n onClick={this.toggle}\n >\n {this.expanded ? this.collapseLabel : this.expandLabel}\n </button>\n </span>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -12,7 +12,7 @@ const NoImage = /*@__PURE__*/ proxyCustomElement(class NoImage extends HTMLEleme
12
12
  }
13
13
  render() {
14
14
  const shieldImg = getAssetPath('./assets/simplified-shield.webp');
15
- return (h("img", { key: 'ba6cc227e90aac2e22b9997ad5c794fd4fd6d5ef', src: shieldImg, alt: "", class: "no-image__img" }));
15
+ return (h("img", { key: 'fcb8177bb7decae1ffc943b5bc6ddeeabc148cd2', src: shieldImg, alt: "", class: "no-image__img" }));
16
16
  }
17
17
  static get assetsDirs() { return ["assets"]; }
18
18
  static get style() { return pennlibsFallbackImgCss; }
@@ -83,7 +83,7 @@ const PennlibsFeedback$1 = /*@__PURE__*/ proxyCustomElement(class PennlibsFeedba
83
83
  }, 600);
84
84
  }
85
85
  render() {
86
- return (h("div", { key: '12bdec6f975166a4c5d451fc1834f70fbce3b424', class: "feedback__container" }, h("div", { key: '4c607ceef5f10760d540d2549a2b186a871714c7', class: "viewport-margins" }, h("div", { key: 'a967498163e05ce60a12bf230d303caa31373c8d', class: "feedback__content" }, !this.hideQuestion && (this.answer === 'yes' ? (h("p", null, "Thank you for letting us know.")) : this.answer === 'no' ? (h("p", null, "We'd like to help. ", h("a", { href: "https://www.library.upenn.edu/contact-us" }, "Contact us"), " and let us know what you're looking for.")) : (h("form", { class: "feedback__inline-question", onSubmit: (e) => this.handleSubmit(e) }, h("h2", null, "Did you find what you need?"), h("button", { type: "submit", name: "answer", value: "yes", class: { 'selected': this.selected === 'yes' }, disabled: !!this.selected }, h("span", null, "Yes"), h("span", { class: "visually-hidden" }, ", I found what I needed.")), h("button", { type: "submit", name: "answer", value: "no", class: { 'selected': this.selected === 'no' }, disabled: !!this.selected }, h("span", null, "No"), h("span", { class: "visually-hidden" }, ", I did not find what I needed."))))), h("div", { key: 'f918da2833ae0c64e67a9e95551edaeb78e2ba05', class: "feedback__share-feedback" }, h("p", { key: '12928af116ffadf669cbc694160ee6ca3458528b' }, "To help us improve, ", h("a", { key: '7281b7423677b104fb622a7fdcf8e768517ea84e', href: `https://upenn.co1.qualtrics.com/jfe/form/SV_3xVrP7EKWS92zfE?reporting_from_url=${encodeURIComponent(window.location.href)}` }, "share your feedback"), "."))))));
86
+ return (h("div", { key: '718c9b67ab9bfec7c946489ca3fa3e607a143889', class: "feedback__container" }, h("div", { key: 'f1d7fb08215224e80ec85ab381a20d017480bc4c', class: "viewport-margins" }, h("div", { key: 'a80b211eb18b1144704eb9dcb7e605328acde70c', class: "feedback__content" }, !this.hideQuestion && (this.answer === 'yes' ? (h("p", null, "Thank you for letting us know.")) : this.answer === 'no' ? (h("p", null, "We'd like to help. ", h("a", { href: "https://www.library.upenn.edu/contact-us" }, "Contact us"), " and let us know what you're looking for.")) : (h("form", { class: "feedback__inline-question", onSubmit: (e) => this.handleSubmit(e) }, h("h2", null, "Did you find what you need?"), h("button", { type: "submit", name: "answer", value: "yes", class: { 'selected': this.selected === 'yes' }, disabled: !!this.selected }, h("span", null, "Yes"), h("span", { class: "visually-hidden" }, ", I found what I needed.")), h("button", { type: "submit", name: "answer", value: "no", class: { 'selected': this.selected === 'no' }, disabled: !!this.selected }, h("span", null, "No"), h("span", { class: "visually-hidden" }, ", I did not find what I needed."))))), h("div", { key: 'e441824f32084a83a0e22c0f282ca73f8295464e', class: "feedback__share-feedback" }, h("p", { key: '7df4f4d3b6f6a2b893be59fbe7517aa8f63eb690' }, "To help us improve, ", h("a", { key: '6defbfffc7839fb2038716844998eeb897ed71b0', href: `https://upenn.co1.qualtrics.com/jfe/form/SV_3xVrP7EKWS92zfE?reporting_from_url=${encodeURIComponent(window.location.href)}` }, "share your feedback"), "."))))));
87
87
  }
88
88
  static get style() { return pennlibsFeedbackCss; }
89
89
  }, [257, "pennlibs-feedback", {
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, getAssetPath, h } from '@stencil/core/internal/client';
2
2
 
3
- 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-fg-subtle-on-emphasis);\n}\n\n.built-with a {\n font-weight: 500;\n text-underline-offset: var(--pl-link-text-underline-offset);\n\n &:hover {\n text-decoration-thickness: var(--pl-link-hover-text-decoration-thickness);\n }\n}\n\n.built-with {\n opacity: 0.875;\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.75em;\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}";
3
+ 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-fg-subtle-on-emphasis);\n}\n\n.built-with a {\n font-weight: 500;\n text-underline-offset: var(--pl-link-text-underline-offset);\n\n &:hover {\n text-decoration-thickness: var(--pl-link-hover-text-decoration-thickness);\n }\n}\n\n.built-with {\n opacity: 0.875;\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.75em;\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.75;\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}";
4
4
 
5
5
  const Footer = /*@__PURE__*/ proxyCustomElement(class Footer extends HTMLElement {
6
6
  constructor(registerHost) {
@@ -37,12 +37,12 @@ const Footer = /*@__PURE__*/ proxyCustomElement(class Footer extends HTMLElement
37
37
  }
38
38
  render() {
39
39
  const footerBackgroundSrc = getAssetPath('./assets/footer-bg.webp');
40
- return (h("footer", { key: '39b1bc7336fe2aa28e8c6093d13b8dfb3dd70d3e', class: "website-footer-wrapper" }, h("div", { key: '7902cf7cde3a468dec8ea71c2a139addafa5af79', class: "website-footer", style: {
40
+ return (h("footer", { key: '15d1f4477bd137e281fcbf6c1e3b70bf55a8a2e0', class: "website-footer-wrapper" }, h("div", { key: '04954e3b1095b6d510e1bae4e5a453f6ff5cb0ce', class: "website-footer", style: {
41
41
  background: `var(--pl-color-penn-blue) url(${footerBackgroundSrc}) no-repeat 50% 50%`,
42
42
  backgroundSize: 'cover',
43
- } }, h("div", { key: '804f9cd3f101997ee2d15d4a4749945ef553a118', class: "viewport-margins" }, h("div", { key: '3a09637400e74e729641666eb8142c0cf77d66b3', class: "website-footer__content" }, h("div", { key: 'cdb9270db298aa7781859a80c799949cb4c35787', class: "website-footer__links-container" }, h("section", { key: '20d953d2b85178798d2298aa8aaa9fb8e47d7af4' }, h("h2", { key: '79b1fe7f4fc2dff03134c7d4e96e9fd657131fc8', class: "website-footer__heading" }, "Penn Libraries"), h("ul", { key: 'ba8002b17457f979f9817c45a89f332064f0b5bb', class: "website-footer__links" }, h("li", { key: 'cb65fc4ad6432ef447a4b98a8dfdc0323bf37ccc' }, h("a", { key: '0b61506da9a1c18919f77410fa39d3937f7485df', href: "https://maps.google.com/?q=Van Pelt Library 3420 Walnut Street, Philadelphia, PA 19104-6206" }, "3420 Walnut Street", h("br", { key: 'ebd3def13a3107d1b301c0932d421b054e2bb338' }), "Philadelphia, PA 19104-6206")), h("li", { key: '3f26ebab3b90a33ba2d17cd3cfd8a485f1c7e74f' }, h("a", { key: 'c2dcf7a3d936eb5376b2568e677bb8a7dc7ab445', href: "tel:(215) 898-7566" }, "(215) 898-7566")), h("li", { key: '8c9374110f2d386c7275fad9522ea2565daf6c06' }, h("a", { key: 'd40a2fd7490f1b233e4839e38faf29d9bb04f519', href: "https://www.library.upenn.edu/contact-us" }, "Contact us")), h("li", { key: 'ab3016b1cfcc8827af060ec383d8556e8346713a' }, h("a", { key: '76a8d246128fb76606c1cdf24640198c23c9d317', href: "https://www.library.upenn.edu/about/hours", target: "_blank" }, "Locations and hours")))), h("section", { key: 'fd0abacbc35ffaafbb2016064c7a6194616ee2dc' }, h("h2", { key: 'a812d7d26e21a1808ce6bd115ec620e1b033a8bf', class: "website-footer__heading" }, "Stay in touch"), h("ul", { key: 'fe158ff1336379e1236a88c4a3d0f5e1efd9cdb8', class: "website-footer__links" }, h("li", { key: '32396df360b39190ff587400fabe405ee319a507' }, h("a", { key: '07ac56362dde7a2807e86c2a22564689ed9de90c', href: "https://www.alumni.upenn.edu/libsignup" }, "Newsletter")), h("li", { key: '95abd2bf0f6a79c0597c1e57e878f986002adde2' }, h("a", { key: '374044fae62fd82c9369cfba8b7c6223ded48d5a', href: "https://www.instagram.com/upennlib/" }, "Instagram")), h("li", { key: '86cc74d4ec21dfb51a072cfad87ed395e961f26f' }, h("a", { key: 'fda9e8c73918252b91e40dc23d289613a3fe5802', href: "https://www.facebook.com/PennLibraries/" }, "Facebook")), h("li", { key: 'b1ce60d7aa5ac8a2aa8bd4f826c11cc753b1488c' }, h("a", { key: 'ccfef8131fc7f9edd44936f1c212d31c08c61682', href: "https://www.linkedin.com/company/penn-libraries" }, "LinkedIn")))), this.navigationByChildren && [
43
+ } }, h("div", { key: 'ba8ce4e14e0e9364863fac7a2839397e2e0b941a', class: "viewport-margins" }, h("div", { key: '63f34d4f96b284e724135ed8987cc2d3d2e3fbd1', class: "website-footer__content" }, h("div", { key: 'a1edf943618100610c6624d35193fc9f0f5968b3', class: "website-footer__links-container" }, h("section", { key: 'c7f7f781d1c6b239d520a8dc725381aec6281b8a' }, h("h2", { key: 'dc87452564eb1c1c1e75105ec8195917f7eb97a2', class: "website-footer__heading" }, "Penn Libraries"), h("ul", { key: '8510d8d758daee5d1c08bdbebf2fd741f6bc3b29', class: "website-footer__links" }, h("li", { key: '5975b1488a02111e692fd80e86db0f72baa4d9d3' }, h("a", { key: '2715c1c9c7a0f2ad1d677906eb5a34ab4c04007c', href: "https://maps.google.com/?q=Van Pelt Library 3420 Walnut Street, Philadelphia, PA 19104-6206" }, "3420 Walnut Street", h("br", { key: '4d380fd2e056d972944a3866ebc52e25689cd44c' }), "Philadelphia, PA 19104-6206")), h("li", { key: '3d52db897689c923b85c67159f8c53ca346e98c2' }, h("a", { key: '1010c1d279e1cb11c7a853f0997b5d8aabd33bdc', href: "tel:(215) 898-7566" }, "(215) 898-7566")), h("li", { key: 'f1d61d6e01c5e2a1fced55e145f101ccc37fdf29' }, h("a", { key: 'f1dc654a1af81a5847aef7c9fc21e025eb8dfced', href: "https://www.library.upenn.edu/contact-us" }, "Contact us")), h("li", { key: '1c96e99267b30a59b65f4e3d726ef948be202d2d' }, h("a", { key: '02c308d0c96d6148ca093e5e0882d5d22aa9c1db', href: "https://www.library.upenn.edu/about/hours", target: "_blank" }, "Locations and hours")))), h("section", { key: '639a1f5a03b1f646b8a519fa4749980512524f33' }, h("h2", { key: 'e8047c4763458e63d20c4dddd6a35dd6f144c016', class: "website-footer__heading" }, "Stay in touch"), h("ul", { key: 'd496f8fbea5a6c8a9d705c90588b6f750f4a8609', class: "website-footer__links" }, h("li", { key: '57d3280c71d8dcf57db397641c9418910cd4cb84' }, h("a", { key: 'c3203a8e36919031b5a14958765ad05c5e590e50', href: "https://www.alumni.upenn.edu/libsignup" }, "Newsletter")), h("li", { key: '0025893e79dc5fde2a86c8305ff57bd7a4bd5962' }, h("a", { key: '4f20f07275a082c43e3dfdbf23b42487d0cc94da', href: "https://www.instagram.com/upennlib/" }, "Instagram")), h("li", { key: '7d6e64d3f6d921e7967b9eea4f307cba5a3c326d' }, h("a", { key: 'b145fc5809b8f2a8225351bd69296da5f803756d', href: "https://www.facebook.com/PennLibraries/" }, "Facebook")), h("li", { key: '471174a0eede78d94704c00d28284cfafc0553e9' }, h("a", { key: '031b7d1aad9f6c27a2898c57cab0b2909d5acc78', href: "https://www.linkedin.com/company/penn-libraries" }, "LinkedIn")))), this.navigationByChildren && [
44
44
  this.navigationByChildren.map(section => (h("section", null, h("h2", { class: "website-footer__heading" }, section.heading), h("ul", { class: "website-footer__links" }, section.links.map(link => (h("li", null, h("a", { href: link.href }, link.label))))))))
45
- ]))), h("div", { key: '4430d39b9b8943d9336020d5ed04cdb80a3b91af', class: "website-footer__footer" }, h("div", { key: '437f0b8894b63c3857f8871eaaaf3d28277738ad', class: "viewport-margins" }, h("ul", { key: '8c4ac37a89006d543a66c8c1ba6bc9d7acc0d6db', class: "website-footer__links website-footer__links--footer" }, h("li", { key: 'ac1db31f3c5331a26c0aee171974c10f22d5da08' }, h("a", { key: 'ad8a6251cca9b0c904ccecff96a8800b22ed5568', href: "https://www.upenn.edu/" }, "UPenn")), h("li", { key: '1189f7119ec768d34ea9435f9ff85df2764abe61' }, h("a", { key: 'eb53d4f15fe49d32899d435670a34369a4e7e190', href: "https://www.upenn.edu/about/privacy-policy" }, "Privacy Policy")), h("li", { key: 'd2a155f7f91a31cca41df9d0c9d37f151bded247' }, h("a", { key: '8e329a895a25bd139867063dd7eed9c0aa7c0060', href: "https://accessibility.web-resources.upenn.edu/get-help" }, "Report Accessibility Issues and Get Help")), h("li", { key: '0b65f3da18b54b91158515d7966e010e4e0d64ac' }, h("a", { key: 'f8615c438f94216372fdb8afa26ae7150bbef816', href: "https://www.upenn.edu/about/disclaimer" }, "Disclaimer")), h("li", { key: 'cbf5febfb926a1b569e73d4a57e7ca8315f6d876' }, h("a", { key: '1116c792623c0fa819ce0189e105ee54c69ba73e', href: "https://www.publicsafety.upenn.edu/contact/" }, "Emergency Services")), h("li", { key: '385a84f264b263a9738d38d66ac917e3a6055db4' }, h("a", { key: 'dcd8517fb32ae46b983cb4802adb86e33e29bd71', href: "https://www.upenn.edu/about/report-copyright-infringement" }, "Report Copyright Infringement")))))), this.showBuiltWith && (h("div", { key: 'd3bca43144b06b50091b54dee5c8734de4f80d60', class: "viewport-margins" }, h("p", { key: 'a3d974ea56f521406bffc2a8eaf6b6e6c57bb595', class: "built-with" }, "Built with the ", h("a", { key: '7aa9fc3901510e0ad7d2b0ca4abf4f8c6f92d735', href: "https://designsystem.library.upenn.edu/" }, "Penn Libraries Design System"), ".")))));
45
+ ]))), h("div", { key: '5ac97b0c44a303ceeb84c88a5da2c7a5417afa55', class: "website-footer__footer" }, h("div", { key: '281481bf6d25945607e1431f634a9f6649b72300', class: "viewport-margins" }, h("ul", { key: '8e4626896cd9dd360eebe55df9f8eb98d485045e', class: "website-footer__links website-footer__links--footer" }, h("li", { key: '021025b20149e8f53e17cf4df1f76a2d9045a52c' }, h("a", { key: '95bd80578f001c06f273800ee9b26c2069c8822c', href: "https://www.upenn.edu/" }, "UPenn")), h("li", { key: 'be940d241e15c85f07ec8f229e4683ccbaf077e4' }, h("a", { key: '1e8db44efbe98e135495240a42e6e74a3829c665', href: "https://www.upenn.edu/about/privacy-policy" }, "Privacy Policy")), h("li", { key: '14a7fb2dfdc4fe417fc66ae05b0e30db13739913' }, h("a", { key: '1e572fd1b6c7c48225a65ef58c1f4cdb2f67afd6', href: "https://accessibility.web-resources.upenn.edu/get-help" }, "Report Accessibility Issues and Get Help")), h("li", { key: '1aeecdc1384586c45ea1500e2a908a0bde97668e' }, h("a", { key: '9e94479dd864300421900e0e9fe4fbb3251d7524', href: "https://www.upenn.edu/about/disclaimer" }, "Disclaimer")), h("li", { key: 'a9d5ce618f8ed4ff4e8360dc11568b067f66101c' }, h("a", { key: '384f77c47f7d28b99fe9fbbf707948a180d973f1', href: "https://www.publicsafety.upenn.edu/contact/" }, "Emergency Services")), h("li", { key: 'a203f0efeea4cfd5275cdee380c12bb9d7e04a38' }, h("a", { key: 'a51d4b482d562aca31ff9b97703950562604ad48', href: "https://www.upenn.edu/about/report-copyright-infringement" }, "Report Copyright Infringement")))))), this.showBuiltWith && (h("div", { key: '43f89da940afef08331d12e2991fa24220afce99', class: "viewport-margins" }, h("p", { key: '25863d379ecb9e7f46186858974a71e150188015', class: "built-with" }, "Built with the ", h("a", { key: '427150399d8b81e090315c01446452f2142bab63', href: "https://designsystem.library.upenn.edu/" }, "Penn Libraries Design System"), ".")))));
46
46
  }
47
47
  static get assetsDirs() { return ["assets"]; }
48
48
  get hostElement() { return this; }
@@ -1 +1 @@
1
- {"file":"pennlibs-footer.js","mappings":";;AAAA,MAAM,iBAAiB,GAAG,o1EAAo1E;;MCiCj2E,MAAM,iBAAAA,kBAAA,CAAA,MAAA,MAAA,SAAA,WAAA,CAAA;AANnB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;AAOE;;AAEG;AACK,QAAA,IAAa,CAAA,aAAA,GAAY,KAAK;AAgGvC;IA1FC,iBAAiB,GAAA;QACf,IAAI,CAAC,uBAAuB,EAAE;;IAGhC,uBAAuB,GAAA;AACrB,QAAA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EAAA,0CAAA,EAAA,EAAI,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,IAAI,EAAC,6CAA6C,EAAA,EAAA,oBAAA,CAAuB,CAAK,EACrF,CAAA,CAAA,IAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAI,CAAG,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,2DAA2D,EAAA,EAAA,+BAAA,CAAkC,CAAK,CAC3G,CACD,CACF,CACF,EACL,IAAI,CAAC,aAAa,KACjB,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,kBAAkB,EAAA,EAC3B,CAAG,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,YAAY,EAAA,qBAAgB,CAAG,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,yCAAyC,EAAiC,EAAA,8BAAA,CAAA,MAAK,CACxH,CACP,CACM;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement"],"sources":["src/components/pennlibs-footer/pennlibs-footer.css?tag=pennlibs-footer&encapsulation=shadow","src/components/pennlibs-footer/pennlibs-footer.tsx"],"sourcesContent":[":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-fg-subtle-on-emphasis);\n}\n\n.built-with a {\n font-weight: 500;\n text-underline-offset: var(--pl-link-text-underline-offset);\n\n &:hover {\n text-decoration-thickness: var(--pl-link-hover-text-decoration-thickness);\n }\n}\n\n.built-with {\n opacity: 0.875;\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.75em;\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}","import { Component, Element, h, getAssetPath, Prop, State } from '@stencil/core';\n\n/**\n * A footer component for Penn Libraries websites that displays contact information,\n * social media links, and custom navigation sections. Automatically organizes\n * child content into navigation sections based on headings and links.\n * \n * @component\n * @example\n * <pennlibs-footer>\n * <section>\n * <h2>Resources</h2>\n * <a href=\"/databases\">Databases</a>\n * <a href=\"/research-guides\">Research Guides</a>\n * </section>\n * <section>\n * <h2>Services</h2>\n * <a href=\"/consultation\">Research Consultation</a>\n * <a href=\"/instruction\">Library Instruction</a>\n * </section>\n * </pennlibs-footer>\n * \n * @slot default - Custom navigation sections with h2 headings and anchor links\n * \n * @prop --pl-viewport-margins-max-width: The maximum width of the footer content.\n * @prop --pl-viewport-margins-gutter: The gutter width of the footer content.\n */\n@Component({\n tag: 'pennlibs-footer',\n styleUrl: 'pennlibs-footer.css',\n shadow: true,\n assetsDirs: ['assets']\n})\nexport class Footer {\n /**\n * When true, shows a \"Built with the Penn Libraries Design System\" line below the footer.\n */\n @Prop() showBuiltWith: boolean = false;\n\n @State() navigationByChildren;\n\n @Element() hostElement: HTMLElement;\n\n componentWillLoad() {\n this.setNavigationByChildren();\n }\n\n setNavigationByChildren() {\n try {\n if (this.hostElement.children) {\n this.navigationByChildren = Array.from(this.hostElement.children).reduce(\n (acc, element) => {\n acc = acc.concat({\n heading: element.querySelector('h2').innerText,\n links: Array.from(element.querySelectorAll('a')).map(link => {\n return { label: link.innerText, href: link.href }\n })\n })\n \n return acc;\n }, []);\n }\n } catch {\n console.warn('<pennlibs-footer> Composed with unexpected HTML', this.hostElement.children)\n }\n }\n\n render() {\n const footerBackgroundSrc = getAssetPath('./assets/footer-bg.webp');\n \n return (\n <footer class=\"website-footer-wrapper\">\n <div class=\"website-footer\" style={{\n background: `var(--pl-color-penn-blue) url(${footerBackgroundSrc}) no-repeat 50% 50%`,\n backgroundSize: 'cover',\n }}>\n <div class=\"viewport-margins\">\n <div class=\"website-footer__content\">\n <div class=\"website-footer__links-container\">\n <section>\n <h2 class=\"website-footer__heading\">Penn Libraries</h2>\n <ul class=\"website-footer__links\">\n <li><a href=\"https://maps.google.com/?q=Van Pelt Library 3420 Walnut Street, Philadelphia, PA 19104-6206\">3420 Walnut Street<br />Philadelphia, PA 19104-6206</a></li>\n <li><a href=\"tel:(215) 898-7566\">(215) 898-7566</a></li>\n <li><a href=\"https://www.library.upenn.edu/contact-us\">Contact us</a></li>\n <li><a href=\"https://www.library.upenn.edu/about/hours\" target=\"_blank\">Locations and hours</a></li>\n </ul>\n </section>\n <section>\n <h2 class=\"website-footer__heading\">Stay in touch</h2>\n <ul class=\"website-footer__links\">\n <li><a href=\"https://www.alumni.upenn.edu/libsignup\">Newsletter</a></li>\n <li><a href=\"https://www.instagram.com/upennlib/\">Instagram</a></li>\n <li><a href=\"https://www.facebook.com/PennLibraries/\">Facebook</a></li>\n <li><a href=\"https://www.linkedin.com/company/penn-libraries\">LinkedIn</a></li>\n </ul>\n </section>\n {this.navigationByChildren && [\n this.navigationByChildren.map(section => (\n <section>\n <h2 class=\"website-footer__heading\">{section.heading}</h2>\n <ul class=\"website-footer__links\">\n {section.links.map(link => (\n <li><a href={link.href}>{link.label}</a></li>\n ))}\n </ul>\n </section>\n ))\n ]}\n </div>\n </div>\n </div>\n <div class=\"website-footer__footer\">\n <div class=\"viewport-margins\"> \n <ul class=\"website-footer__links website-footer__links--footer\">\n <li><a href=\"https://www.upenn.edu/\">UPenn</a></li>\n <li><a href=\"https://www.upenn.edu/about/privacy-policy\">Privacy Policy</a></li>\n <li><a href=\"https://accessibility.web-resources.upenn.edu/get-help\">Report Accessibility Issues and Get Help</a></li>\n <li><a href=\"https://www.upenn.edu/about/disclaimer\">Disclaimer</a></li>\n <li><a href=\"https://www.publicsafety.upenn.edu/contact/\">Emergency Services</a></li>\n <li><a href=\"https://www.upenn.edu/about/report-copyright-infringement\">Report Copyright Infringement</a></li>\n </ul>\n </div>\n </div>\n </div>\n {this.showBuiltWith && (\n <div class=\"viewport-margins\">\n <p class=\"built-with\">Built with the <a href=\"https://designsystem.library.upenn.edu/\">Penn Libraries Design System</a>.</p>\n </div>\n )}\n </footer>\n );\n }\n}\n"],"version":3}
1
+ {"file":"pennlibs-footer.js","mappings":";;AAAA,MAAM,iBAAiB,GAAG,m1EAAm1E;;MCiCh2E,MAAM,iBAAAA,kBAAA,CAAA,MAAA,MAAA,SAAA,WAAA,CAAA;AANnB,IAAA,WAAA,C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AAA,0CAAA,EAAA,EAAI,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,IAAI,EAAC,wCAAwC,EAAA,EAAA,YAAA,CAAe,CAAK,EACxE,CAAA,CAAA,IAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAI,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,IAAI,EAAC,6CAA6C,EAAA,EAAA,oBAAA,CAAuB,CAAK,EACrF,CAAA,CAAA,IAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAI,CAAG,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,2DAA2D,EAAA,EAAA,+BAAA,CAAkC,CAAK,CAC3G,CACD,CACF,CACF,EACL,IAAI,CAAC,aAAa,KACjB,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,kBAAkB,EAAA,EAC3B,CAAG,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,YAAY,EAAA,qBAAgB,CAAG,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,yCAAyC,EAAiC,EAAA,8BAAA,CAAA,MAAK,CACxH,CACP,CACM;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement"],"sources":["src/components/pennlibs-footer/pennlibs-footer.css?tag=pennlibs-footer&encapsulation=shadow","src/components/pennlibs-footer/pennlibs-footer.tsx"],"sourcesContent":[":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-fg-subtle-on-emphasis);\n}\n\n.built-with a {\n font-weight: 500;\n text-underline-offset: var(--pl-link-text-underline-offset);\n\n &:hover {\n text-decoration-thickness: var(--pl-link-hover-text-decoration-thickness);\n }\n}\n\n.built-with {\n opacity: 0.875;\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.75em;\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.75;\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}","import { Component, Element, h, getAssetPath, Prop, State } from '@stencil/core';\n\n/**\n * A footer component for Penn Libraries websites that displays contact information,\n * social media links, and custom navigation sections. Automatically organizes\n * child content into navigation sections based on headings and links.\n * \n * @component\n * @example\n * <pennlibs-footer>\n * <section>\n * <h2>Resources</h2>\n * <a href=\"/databases\">Databases</a>\n * <a href=\"/research-guides\">Research Guides</a>\n * </section>\n * <section>\n * <h2>Services</h2>\n * <a href=\"/consultation\">Research Consultation</a>\n * <a href=\"/instruction\">Library Instruction</a>\n * </section>\n * </pennlibs-footer>\n * \n * @slot default - Custom navigation sections with h2 headings and anchor links\n * \n * @prop --pl-viewport-margins-max-width: The maximum width of the footer content.\n * @prop --pl-viewport-margins-gutter: The gutter width of the footer content.\n */\n@Component({\n tag: 'pennlibs-footer',\n styleUrl: 'pennlibs-footer.css',\n shadow: true,\n assetsDirs: ['assets']\n})\nexport class Footer {\n /**\n * When true, shows a \"Built with the Penn Libraries Design System\" line below the footer.\n */\n @Prop() showBuiltWith: boolean = false;\n\n @State() navigationByChildren;\n\n @Element() hostElement: HTMLElement;\n\n componentWillLoad() {\n this.setNavigationByChildren();\n }\n\n setNavigationByChildren() {\n try {\n if (this.hostElement.children) {\n this.navigationByChildren = Array.from(this.hostElement.children).reduce(\n (acc, element) => {\n acc = acc.concat({\n heading: element.querySelector('h2').innerText,\n links: Array.from(element.querySelectorAll('a')).map(link => {\n return { label: link.innerText, href: link.href }\n })\n })\n \n return acc;\n }, []);\n }\n } catch {\n console.warn('<pennlibs-footer> Composed with unexpected HTML', this.hostElement.children)\n }\n }\n\n render() {\n const footerBackgroundSrc = getAssetPath('./assets/footer-bg.webp');\n \n return (\n <footer class=\"website-footer-wrapper\">\n <div class=\"website-footer\" style={{\n background: `var(--pl-color-penn-blue) url(${footerBackgroundSrc}) no-repeat 50% 50%`,\n backgroundSize: 'cover',\n }}>\n <div class=\"viewport-margins\">\n <div class=\"website-footer__content\">\n <div class=\"website-footer__links-container\">\n <section>\n <h2 class=\"website-footer__heading\">Penn Libraries</h2>\n <ul class=\"website-footer__links\">\n <li><a href=\"https://maps.google.com/?q=Van Pelt Library 3420 Walnut Street, Philadelphia, PA 19104-6206\">3420 Walnut Street<br />Philadelphia, PA 19104-6206</a></li>\n <li><a href=\"tel:(215) 898-7566\">(215) 898-7566</a></li>\n <li><a href=\"https://www.library.upenn.edu/contact-us\">Contact us</a></li>\n <li><a href=\"https://www.library.upenn.edu/about/hours\" target=\"_blank\">Locations and hours</a></li>\n </ul>\n </section>\n <section>\n <h2 class=\"website-footer__heading\">Stay in touch</h2>\n <ul class=\"website-footer__links\">\n <li><a href=\"https://www.alumni.upenn.edu/libsignup\">Newsletter</a></li>\n <li><a href=\"https://www.instagram.com/upennlib/\">Instagram</a></li>\n <li><a href=\"https://www.facebook.com/PennLibraries/\">Facebook</a></li>\n <li><a href=\"https://www.linkedin.com/company/penn-libraries\">LinkedIn</a></li>\n </ul>\n </section>\n {this.navigationByChildren && [\n this.navigationByChildren.map(section => (\n <section>\n <h2 class=\"website-footer__heading\">{section.heading}</h2>\n <ul class=\"website-footer__links\">\n {section.links.map(link => (\n <li><a href={link.href}>{link.label}</a></li>\n ))}\n </ul>\n </section>\n ))\n ]}\n </div>\n </div>\n </div>\n <div class=\"website-footer__footer\">\n <div class=\"viewport-margins\"> \n <ul class=\"website-footer__links website-footer__links--footer\">\n <li><a href=\"https://www.upenn.edu/\">UPenn</a></li>\n <li><a href=\"https://www.upenn.edu/about/privacy-policy\">Privacy Policy</a></li>\n <li><a href=\"https://accessibility.web-resources.upenn.edu/get-help\">Report Accessibility Issues and Get Help</a></li>\n <li><a href=\"https://www.upenn.edu/about/disclaimer\">Disclaimer</a></li>\n <li><a href=\"https://www.publicsafety.upenn.edu/contact/\">Emergency Services</a></li>\n <li><a href=\"https://www.upenn.edu/about/report-copyright-infringement\">Report Copyright Infringement</a></li>\n </ul>\n </div>\n </div>\n </div>\n {this.showBuiltWith && (\n <div class=\"viewport-margins\">\n <p class=\"built-with\">Built with the <a href=\"https://designsystem.library.upenn.edu/\">Penn Libraries Design System</a>.</p>\n </div>\n )}\n </footer>\n );\n }\n}\n"],"version":3}
@@ -55,7 +55,7 @@ const Header = /*@__PURE__*/ proxyCustomElement(class Header extends HTMLElement
55
55
  return (h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24", viewBox: "0 -960 960 960", width: "24" }, h("path", { fill: "currentColor", d: "M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z" })));
56
56
  }
57
57
  render() {
58
- return (h("header", { key: '6d14c72db0c06f38d66927f3f3102b7db82c1317', class: `viewport-margins website-header ${this.theme === 'dark' && 'website-header--dark'}` }, h("div", { key: 'f7411c48f1f5ba8d267eb53cba7adb3d41c74aec', class: "website-header__inner-container" }, h("div", { key: '78be403367c64beaf5b4cdceac458efc0007980e', class: "website-header__logo-name-container" }, h("a", { key: '8b3e0da246ea69744b83debb0b5e23e271a64520', href: "https://www.library.upenn.edu/", class: "website-header_logo-link", "aria-label": "Penn Libraries" }, this.theme === 'dark' ? h(LogoWhite, null) : h(LogoBlue, null)), this.serviceName && (h("a", { key: '1e1208fd657497dac0f3bb8a09d6b8e8507d2d04', href: "/", class: "website-header__service-link" }, h("span", { key: '33a0c53e36a064a999025eeeae5d3bab9bca11bc', class: "website-header__service-name" }, this.serviceName), this.serviceLede && h("span", { key: '809ca2fdb42dbc35a80474a0e06a39bbba5fb675', class: "website-header__service-lede" }, this.serviceLede))), h("slot", { key: '91cfd1e15bd1e7de19a418d0bc05095fd634870b', name: "name-end" })), this.navigation.length > 0 && (h("nav", { key: 'ce1c1d9fb21fa12b81fb17f9204885c27f86e380', class: "website-header__navigation" }, h("button", { key: 'bdefe1220e526611c7ff9ef9f46be67028077263', class: "website-header__navigation-button", "aria-expanded": `${this.isMenuOpen}`, onClick: () => this.handleToggleMenu() }, this.renderMenuIcon(), " Menu"), this.navigation && (h("ol", { key: '0af8e80d1ba55d267037e28d18caa03714600b22', class: `website-header__navigation-list ${this.isMenuOpen && 'website-header__navigation-list--visible'}` }, this.navigation.map(element => h("li", { innerHTML: element.outerHTML })))))), h("slot", { key: '605d0e5b7caba6cdebf98ace0d708453ab0c4b0f', name: "end" }))));
58
+ return (h("header", { key: '5b9d608f76d32ea50d377d251c2c2153a53b1875', class: `viewport-margins website-header ${this.theme === 'dark' && 'website-header--dark'}` }, h("div", { key: 'b15e4a006b6a29f671df20e8bb65d2e9e71c25f3', class: "website-header__inner-container" }, h("div", { key: '5c3e13c63b317a44dee3b07c2dbcbdc4e33fb40a', class: "website-header__logo-name-container" }, h("a", { key: 'aa2d4a9b55fe73eac1b433da51db7e70c2a9100d', href: "https://www.library.upenn.edu/", class: "website-header_logo-link", "aria-label": "Penn Libraries" }, this.theme === 'dark' ? h(LogoWhite, null) : h(LogoBlue, null)), this.serviceName && (h("a", { key: 'bff559907d2e26bb2e9f055645a68d7b35558ef5', href: "/", class: "website-header__service-link" }, h("span", { key: '30376d9a13d24c78dd10f11c74acc017bb7ef9ee', class: "website-header__service-name" }, this.serviceName), this.serviceLede && h("span", { key: '6bb01b158d0205a4d534b186379c0e00cb1cb076', class: "website-header__service-lede" }, this.serviceLede))), h("slot", { key: 'bff814b020b3a7c4eee900c19a871e47bebbfac7', name: "name-end" })), this.navigation.length > 0 && (h("nav", { key: 'f1949adb87868902885d65a65504f4ee4eb9c799', class: "website-header__navigation" }, h("button", { key: '7cd866c7dfb52caa705a74c8af5bba443c55257e', class: "website-header__navigation-button", "aria-expanded": `${this.isMenuOpen}`, onClick: () => this.handleToggleMenu() }, this.renderMenuIcon(), " Menu"), this.navigation && (h("ol", { key: '84270b993db01e2c46ce8a94be6c61a95c59f40a', class: `website-header__navigation-list ${this.isMenuOpen && 'website-header__navigation-list--visible'}` }, this.navigation.map(element => h("li", { innerHTML: element.outerHTML })))))), h("slot", { key: 'ff3234593474b8f5a63836a6f519d85a5fe73ba2', name: "end" }))));
59
59
  }
60
60
  static get assetsDirs() { return ["assets"]; }
61
61
  get hostElement() { return this; }
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
2
 
3
- 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;font-size:var(--pl-font-size-5xl);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:var(--pl-font-size-4xl)}}.hero__sub-heading{font-size:1.25em;font-family:var(--pl-font-family);font-weight:400;color:var(--pl-hero-color);max-width:52ch;text-wrap:pretty;margin-top:var(--pl-space-s);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}}";
3
+ 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;container-type:inline-size}.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;font-size:var(--pl-font-size-5xl);font-size:clamp(var(--pl-font-size-4xl), 3cqi + 1rem, var(--pl-font-size-5xl));font-weight:400;font-family:var(--pl-hero-heading-font);text-wrap:pretty;max-width:30ch;margin:0;color:var(--pl-hero-color)}.hero__sub-heading{font-size:1.25em;font-family:var(--pl-font-family);font-weight:400;color:var(--pl-hero-color);max-width:52ch;text-wrap:pretty;margin-top:var(--pl-space-s);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__sub-heading{font-size:1em}}";
4
4
 
5
5
  const getCurrentImageSource = (pictureElement) => {
6
6
  const imgElement = pictureElement.querySelector('img');
@@ -51,7 +51,7 @@ const Hero = /*@__PURE__*/ proxyCustomElement(class Hero extends HTMLElement {
51
51
  }
52
52
  }
53
53
  render() {
54
- return (h("div", { key: 'd05bbd0346ad50b3e0f3264b8263bcf54534adb5', class: "hero", style: { backgroundImage: `url(${this.heroSrc})` } }, h("div", { key: 'd1016edd7705c437ee065e5bb355840bd9907bcb', class: "hero__content" }, h("slot", { key: '89d03122b810c823516912236b899a0b77d62af7', name: "start" }), h("div", { key: '723cc18e93c02990028d7f7f19afc8b861afa0f2', class: "hero__heading-container" }, this.heroHeadingElement && (h("div", { key: 'bc634a22c4de25b7780b8d46bb1bf91cb50000be', class: "viewport-margins" }, h("h1", { key: '307269e0a116a254b2dc94009fdbf5679a0e169d', class: "hero__heading", innerHTML: this.heroHeadingElement.innerText }), this.heroParagraphElement && h("p", { key: '3258869e6449257d517312cedc4b7749deaaaf0f', class: "hero__sub-heading", innerHTML: this.heroParagraphElement.innerHTML })))))));
54
+ return (h("div", { key: '4234b8c7129b9ad562e979a62124bb8b059f4906', class: "hero", style: { backgroundImage: `url(${this.heroSrc})` } }, h("div", { key: '48e60ea4da5432ca67ad355d79043fdefc9f916f', class: "hero__content" }, h("slot", { key: 'f08f58488b758cb0a5fe88d8c05b37fda2332ca4', name: "start" }), h("div", { key: '17a6b7a12512779048dcfa5ef68f58be34743541', class: "hero__heading-container" }, this.heroHeadingElement && (h("div", { key: 'e059b09f3797425587c268e714e605f8abdd20d7', class: "viewport-margins" }, h("h1", { key: '152d036ee2d7838c6faa072c0ea795c31ea7b120', class: "hero__heading", innerHTML: this.heroHeadingElement.innerText }), this.heroParagraphElement && h("p", { key: 'e942105a04ab4e75a502dbd19d5f465efb2acb18', class: "hero__sub-heading", innerHTML: this.heroParagraphElement.innerHTML })))))));
55
55
  }
56
56
  static get assetsDirs() { return ["assets"]; }
57
57
  get hostElement() { return this; }
@@ -1 +1 @@
1
- {"file":"pennlibs-hero.js","mappings":";;AAAA,MAAM,eAAe,GAAG,usEAAusE;;ACE/tE,MAAM,qBAAqB,GAAG,CAAC,cAAkC,KAAY;IAC3E,MAAM,UAAU,GAAG,cAAc,CAAC,aAAa,CAAC,KAAK,CAAC;IACtD,OAAO,CAAA,UAAU,KAAA,IAAA,IAAV,UAAU,KAAA,MAAA,GAAA,MAAA,GAAV,UAAU,CAAE,UAAU,KAAI,EAAE;AACrC,CAAC;MAgBY,IAAI,iBAAAA,kBAAA,CAAA,MAAA,IAAA,SAAA,WAAA,CAAA;AANjB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;AAQW,QAAA,IAAkB,CAAA,kBAAA,GAA8B,IAAI;AACpD,QAAA,IAAkB,CAAA,kBAAA,GAA8B,IAAI;AACpD,QAAA,IAAoB,CAAA,oBAAA,GAAgC,IAAI;AACxD,QAAA,IAAO,CAAA,OAAA,GAAW,EAAE;AACrB,QAAA,IAAO,CAAA,OAAA,GAAW,EAAE;AAyD7B;IAtDC,iBAAiB,GAAA;QACf,MAAM,kBAAkB,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,6BAA6B,CAAuB;QAC9G,IAAI,kBAAkB,EAAE;AACtB,YAAA,IAAI,CAAC,kBAAkB,GAAG,kBAAkB;AAC5C,YAAA,IAAI,CAAC,uBAAuB,CAAC,kBAAkB,CAAC;;QAGlD,MAAM,kBAAkB,GAAG,IAAI,C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AAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,yBAAyB,EAAA,EACjC,IAAI,CAAC,kBAAkB,KACtB,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,kBAAkB,EAAA,EAC3B,CAAI,CAAA,IAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,eAAe,EAAC,SAAS,EAAE,IAAI,CAAC,kBAAkB,CAAC,SAAS,EAAI,CAAA,EACzE,IAAI,CAAC,oBAAoB,IAAI,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,KAAK,EAAC,mBAAmB,EAAC,SAAS,EAAE,IAAI,CAAC,oBAAoB,CAAC,SAAS,EAAI,CAAA,CACzG,CACP,CACG,CACF,CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement"],"sources":["src/components/pennlibs-hero/pennlibs-hero.css?tag=pennlibs-hero&encapsulation=shadow","src/components/pennlibs-hero/pennlibs-hero.tsx"],"sourcesContent":[":host {\n --pl-hero-height: clamp(42vh, 32rem, 26rem);\n --pl-hero-heading-font: var(--pl-font-serif);\n --pl-hero-color: var(--pl-color-fg-on-emphasis);\n}\n\n*, *:before, *:after {\n box-sizing: inherit;\n}\n\n.visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n\n.viewport-margins {\n width: 100%;\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/* Start of Selection */\n/* Hero section */\n.hero {\n position: relative;\n min-height: var(--pl-hero-height);\n height: 100%;\n background-size: cover;\n background-repeat: no-repeat;\n background-position: 50% 33%;\n display: flex;\n}\n/* End of Selection */\n\n.hero::before {\n content: \"\";\n display: flex;\n width: 100%;\n height: 100%;\n top: 0;\n position: absolute;\n 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%);\n z-index: 0;\n}\n\n \n.hero::after {\n content: \"\";\n display: flex;\n width: 100%;\n height: 100%;\n top: 0;\n position: absolute;\n 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%);\n z-index: 0;\n}\n\n.hero__content {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n z-index: 1;\n}\n\n.hero__heading-container {\n margin-top: auto;\n padding-top: var(--pl-space-3xl);\n padding-bottom: var(--pl-space-3xl);\n}\n\n.hero__heading {\n text-shadow: 1px 1px 2px var(--pl-color-fg-default);\n line-height: 1;\n font-size: var(--pl-font-size-5xl);\n font-weight: 400;\n font-family: var(--pl-hero-heading-font);\n text-wrap: pretty;\n max-width: 30ch;\n margin: 0;\n color: var(--pl-hero-color);\n}\n\n@media (max-width: 920px) {\n .hero__heading {\n font-size: var(--pl-font-size-4xl);\n }\n}\n\n.hero__sub-heading {\n font-size: 1.25em;\n font-family: var(--pl-font-family);\n font-weight: 400;\n color: var(--pl-hero-color);\n max-width: 52ch;\n text-wrap: pretty;\n margin-top: var(--pl-space-s);\n margin-bottom: 0;\n}\n\n.hero__sub-heading a {\n text-decoration: underline;\n text-underline-offset: var(--pl-link-text-underline-offset);\n text-decoration-thickness: var(--pl-link-text-decoration-thickness);\n color: var(--pl-hero-color);\n}\n\n.hero__sub-heading a:hover {\n text-decoration-thickness: var(--pl-link-hover-text-decoration-thickness);\n}\n\n.hero__sub-heading strong {\n font-weight: bold;\n}\n\n@media (max-width: 620px) {\n .hero__heading {\n font-size: 2.75em;\n }\n\n .hero__sub-heading {\n font-size: 1em;\n }\n}","import { h, Component, State, Element } from \"@stencil/core\";\n\nconst getCurrentImageSource = (pictureElement: HTMLPictureElement): string => {\n const imgElement = pictureElement.querySelector('img');\n return imgElement?.currentSrc || '';\n};\n\n/**\n * Place your most important content in a prominent space, often at the top of your website.\n *\n * @slot start - Content to display at the start (top) of the hero.\n * \n * @prop --pl-viewport-margins-max-width: The maximum width of the hero inner content.\n * @prop --pl-viewport-margins-gutter: The gutter width of the hero inner content.\n */\n@Component({\n tag: 'pennlibs-hero',\n styleUrl: 'pennlibs-hero.css',\n shadow: true,\n assetsDirs: ['assets']\n})\nexport class Hero {\n @Element() hostElement: HTMLElement;\n @State() heroPictureElement: null | HTMLPictureElement = null;\n @State() heroHeadingElement: null | HTMLHeadingElement = null;\n @State() heroParagraphElement: null | HTMLParagraphElement = null;\n @State() heroSrc: string = \"\";\n private lastSrc: string = \"\";\n private animationFrameId: number;\n\n componentWillLoad() {\n const heroPictureElement = this.hostElement.querySelector('picture[hero=art-direction]') as HTMLPictureElement;\n if (heroPictureElement) {\n this.heroPictureElement = heroPictureElement;\n this.startWatchingCurrentSrc(heroPictureElement);\n }\n\n const heroHeadingElement = this.hostElement.querySelector('h1[hero=heading]') as HTMLHeadingElement;\n if (heroHeadingElement) {\n this.heroHeadingElement = heroHeadingElement;\n }\n\n const heroParagraphElement = this.hostElement.querySelector('p[hero=sub-heading]') as HTMLParagraphElement;\n if (heroParagraphElement) {\n this.heroParagraphElement = heroParagraphElement;\n }\n }\n\n private startWatchingCurrentSrc(pictureElement: HTMLPictureElement) {\n const checkCurrentSrc = () => {\n const currentSrc = getCurrentImageSource(pictureElement);\n if (currentSrc !== this.lastSrc) {\n this.lastSrc = currentSrc;\n this.heroSrc = currentSrc;\n }\n this.animationFrameId = requestAnimationFrame(checkCurrentSrc);\n };\n \n this.animationFrameId = requestAnimationFrame(checkCurrentSrc);\n }\n\n disconnectedCallback() {\n if (this.animationFrameId) {\n cancelAnimationFrame(this.animationFrameId);\n }\n }\n\n render() {\n return (\n <div class=\"hero\" style={{ backgroundImage: `url(${this.heroSrc})` }}>\n <div class=\"hero__content\">\n <slot name=\"start\" />\n <div class=\"hero__heading-container\">\n {this.heroHeadingElement && (\n <div class=\"viewport-margins\">\n <h1 class=\"hero__heading\" innerHTML={this.heroHeadingElement.innerText} />\n {this.heroParagraphElement && <p class=\"hero__sub-heading\" innerHTML={this.heroParagraphElement.innerHTML} />}\n </div>\n )}\n </div>\n </div>\n </div>\n )\n }\n}"],"version":3}
1
+ {"file":"pennlibs-hero.js","mappings":";;AAAA,MAAM,eAAe,GAAG,qsEAAqsE;;ACE7tE,MAAM,qBAAqB,GAAG,CAAC,cAAkC,KAAY;IAC3E,MAAM,UAAU,GAAG,cAAc,CAAC,aAAa,CAAC,KAAK,CAAC;IACtD,OAAO,CAAA,UAAU,KAAA,IAAA,IAAV,UAAU,KAAA,MAAA,GAAA,MAAA,GAAV,UAAU,CAAE,UAAU,KAAI,EAAE;AACrC,CAAC;MAgBY,IAAI,iBAAAA,kBAAA,CAAA,MAAA,IAAA,SAAA,WAAA,CAAA;AANjB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;AAQW,QAAA,IAAkB,CAAA,kBAAA,GAA8B,IAAI;AACpD,QAAA,IAAkB,CAAA,kBAAA,GAA8B,IAAI;AACpD,QAAA,IAAoB,CAAA,oBAAA,GAAgC,IAAI;AACxD,QAAA,IAAO,CAAA,OAAA,GAAW,EAAE;AACrB,QAAA,IAAO,CAAA,OAAA,GAAW,EAAE;AAyD7B;IAtDC,iBAAiB,GAAA;QACf,MAAM,kBAAkB,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,6BAA6B,CAAuB;QAC9G,IAAI,kBAAkB,EAAE;AACtB,YAAA,IAAI,CAAC,kBAAkB,GAAG,kBAAkB;AAC5C,YAAA,IAAI,CAAC,uBAAuB,CAAC,kBAAkB,CAAC;;QAGlD,MAAM,kBAAkB,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,kBAAkB,CAAuB;QACnG,IAAI,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EACjC,IAAI,CAAC,kBAAkB,KACtB,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,kBAAkB,EAAA,EAC3B,CAAI,CAAA,IAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,eAAe,EAAC,SAAS,EAAE,IAAI,CAAC,kBAAkB,CAAC,SAAS,EAAI,CAAA,EACzE,IAAI,CAAC,oBAAoB,IAAI,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,KAAK,EAAC,mBAAmB,EAAC,SAAS,EAAE,IAAI,CAAC,oBAAoB,CAAC,SAAS,EAAI,CAAA,CACzG,CACP,CACG,CACF,CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement"],"sources":["src/components/pennlibs-hero/pennlibs-hero.css?tag=pennlibs-hero&encapsulation=shadow","src/components/pennlibs-hero/pennlibs-hero.tsx"],"sourcesContent":[":host {\n --pl-hero-height: clamp(42vh, 32rem, 26rem);\n --pl-hero-heading-font: var(--pl-font-serif);\n --pl-hero-color: var(--pl-color-fg-on-emphasis);\n}\n\n*, *:before, *:after {\n box-sizing: inherit;\n}\n\n.visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n\n.viewport-margins {\n width: 100%;\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/* Start of Selection */\n/* Hero section */\n.hero {\n position: relative;\n min-height: var(--pl-hero-height);\n height: 100%;\n background-size: cover;\n background-repeat: no-repeat;\n background-position: 50% 33%;\n display: flex;\n /* Establish a container so .hero__heading can scale fluidly with the\n hero's own width via `cqi` units. */\n container-type: inline-size;\n}\n/* End of Selection */\n\n.hero::before {\n content: \"\";\n display: flex;\n width: 100%;\n height: 100%;\n top: 0;\n position: absolute;\n 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%);\n z-index: 0;\n}\n\n \n.hero::after {\n content: \"\";\n display: flex;\n width: 100%;\n height: 100%;\n top: 0;\n position: absolute;\n 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%);\n z-index: 0;\n}\n\n.hero__content {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n z-index: 1;\n}\n\n.hero__heading-container {\n margin-top: auto;\n padding-top: var(--pl-space-3xl);\n padding-bottom: var(--pl-space-3xl);\n}\n\n.hero__heading {\n text-shadow: 1px 1px 2px var(--pl-color-fg-default);\n line-height: 1;\n /* Fallback for browsers that don't parse `cqi`. */\n font-size: var(--pl-font-size-5xl);\n font-size: clamp(var(--pl-font-size-4xl), 3cqi + 1rem, var(--pl-font-size-5xl));\n font-weight: 400;\n font-family: var(--pl-hero-heading-font);\n text-wrap: pretty;\n max-width: 30ch;\n margin: 0;\n color: var(--pl-hero-color);\n}\n\n.hero__sub-heading {\n font-size: 1.25em;\n font-family: var(--pl-font-family);\n font-weight: 400;\n color: var(--pl-hero-color);\n max-width: 52ch;\n text-wrap: pretty;\n margin-top: var(--pl-space-s);\n margin-bottom: 0;\n}\n\n.hero__sub-heading a {\n text-decoration: underline;\n text-underline-offset: var(--pl-link-text-underline-offset);\n text-decoration-thickness: var(--pl-link-text-decoration-thickness);\n color: var(--pl-hero-color);\n}\n\n.hero__sub-heading a:hover {\n text-decoration-thickness: var(--pl-link-hover-text-decoration-thickness);\n}\n\n.hero__sub-heading strong {\n font-weight: bold;\n}\n\n@media (max-width: 620px) {\n .hero__sub-heading {\n font-size: 1em;\n }\n}","import { h, Component, State, Element } from \"@stencil/core\";\n\nconst getCurrentImageSource = (pictureElement: HTMLPictureElement): string => {\n const imgElement = pictureElement.querySelector('img');\n return imgElement?.currentSrc || '';\n};\n\n/**\n * Place your most important content in a prominent space, often at the top of your website.\n *\n * @slot start - Content to display at the start (top) of the hero.\n * \n * @prop --pl-viewport-margins-max-width: The maximum width of the hero inner content.\n * @prop --pl-viewport-margins-gutter: The gutter width of the hero inner content.\n */\n@Component({\n tag: 'pennlibs-hero',\n styleUrl: 'pennlibs-hero.css',\n shadow: true,\n assetsDirs: ['assets']\n})\nexport class Hero {\n @Element() hostElement: HTMLElement;\n @State() heroPictureElement: null | HTMLPictureElement = null;\n @State() heroHeadingElement: null | HTMLHeadingElement = null;\n @State() heroParagraphElement: null | HTMLParagraphElement = null;\n @State() heroSrc: string = \"\";\n private lastSrc: string = \"\";\n private animationFrameId: number;\n\n componentWillLoad() {\n const heroPictureElement = this.hostElement.querySelector('picture[hero=art-direction]') as HTMLPictureElement;\n if (heroPictureElement) {\n this.heroPictureElement = heroPictureElement;\n this.startWatchingCurrentSrc(heroPictureElement);\n }\n\n const heroHeadingElement = this.hostElement.querySelector('h1[hero=heading]') as HTMLHeadingElement;\n if (heroHeadingElement) {\n this.heroHeadingElement = heroHeadingElement;\n }\n\n const heroParagraphElement = this.hostElement.querySelector('p[hero=sub-heading]') as HTMLParagraphElement;\n if (heroParagraphElement) {\n this.heroParagraphElement = heroParagraphElement;\n }\n }\n\n private startWatchingCurrentSrc(pictureElement: HTMLPictureElement) {\n const checkCurrentSrc = () => {\n const currentSrc = getCurrentImageSource(pictureElement);\n if (currentSrc !== this.lastSrc) {\n this.lastSrc = currentSrc;\n this.heroSrc = currentSrc;\n }\n this.animationFrameId = requestAnimationFrame(checkCurrentSrc);\n };\n \n this.animationFrameId = requestAnimationFrame(checkCurrentSrc);\n }\n\n disconnectedCallback() {\n if (this.animationFrameId) {\n cancelAnimationFrame(this.animationFrameId);\n }\n }\n\n render() {\n return (\n <div class=\"hero\" style={{ backgroundImage: `url(${this.heroSrc})` }}>\n <div class=\"hero__content\">\n <slot name=\"start\" />\n <div class=\"hero__heading-container\">\n {this.heroHeadingElement && (\n <div class=\"viewport-margins\">\n <h1 class=\"hero__heading\" innerHTML={this.heroHeadingElement.innerText} />\n {this.heroParagraphElement && <p class=\"hero__sub-heading\" innerHTML={this.heroParagraphElement.innerHTML} />}\n </div>\n )}\n </div>\n </div>\n </div>\n )\n }\n}"],"version":3}