@itcenteratunihelsinki/huds-lib 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/heading.js +2 -2
- package/components/hy-crisis-banner.js +1 -1
- package/components/hy-hero.js +1 -1
- package/components/hy-opening-hours.js +1 -1
- package/dist/cjs/hy-breadcrumbs_15.cjs.entry.js +2 -2
- package/dist/cjs/hy-crisis-banner.cjs.entry.js +1 -1
- package/dist/cjs/hy-hero.cjs.entry.js +1 -1
- package/dist/cjs/hy-opening-hours_2.cjs.entry.js +1 -1
- package/dist/collection/components/hy-crisis-banner/hy-crisis-banner.css +2 -2
- package/dist/collection/components/hy-heading/heading-fw.css +54 -25
- package/dist/collection/components/hy-heading/heading.css +54 -25
- package/dist/collection/components/hy-hero/hy-hero.css +1 -1
- package/dist/collection/components/hy-opening-hours/hy-opening-hours.css +2 -2
- package/dist/esm/hy-breadcrumbs_15.entry.js +2 -2
- package/dist/esm/hy-crisis-banner.entry.js +1 -1
- package/dist/esm/hy-hero.entry.js +1 -1
- package/dist/esm/hy-opening-hours_2.entry.js +1 -1
- package/dist/huds-lib/huds-lib.css +1 -1
- package/dist/huds-lib/hy-breadcrumbs_15.entry.js +1 -1
- package/dist/huds-lib/hy-crisis-banner.entry.js +1 -1
- package/dist/huds-lib/hy-hero.entry.js +1 -1
- package/dist/huds-lib/hy-opening-hours_2.entry.js +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as t,H as h,g as i}from"./index-2ffe17c9.js";import{j as o}from"./globalScript-7f6ce018.js";import{H as r,a,b as n,c as l,d}from"./utils-1e7f5184.js";const g=class{constructor(t){e(this,t),this.heroType=r.landing,this.heroGroupType=a.default,this.colorVariant=n.blue,this.sizeVariant=l.large,this.heroTextColor=null,this.image=void 0,this.imageHeight=null,this.imageWidth=null,this.imageAltText="",this.disableLazy=!1,this.hasShortcuts=!1,this.heading=void 0,this.description=void 0,this.subtitle=void 0,this.url=void 0,this.urlTitle=void 0,this.scLabel=void 0,this.isExternal=!1,this.sourceSet=void 0}async componentWillLoad(){this._sourceSet=await o(this.sourceSet)}createImageElement(e,h,i){return t("div",{class:"hy-hero__image-container",style:i},e.image&&(h?t("picture",null,h.map((e=>t("source",{srcSet:e.src,media:e.media,type:e.type,sizes:e.sizes?e.sizes:""}))),t("img",{loading:e.disableLazy?"eager":"lazy",alt:e.imageAltText,class:"hy-image__image",src:e.image,height:e.imageHeight,width:e.imageWidth})):t("img",{loading:e.disableLazy?"eager":"lazy",alt:e.imageAltText,class:"hy-image__image",src:e.image,height:e.imageHeight,width:e.imageWidth})))}render(){let e=d.heroWhite,i=this.colorVariant,o=this.heroType;"minor_landing"===this.heroType&&(i=n.white,o=r.landing),i===n.blue&&(e=d.heroBlue),i===n.black&&(e=d.heroBlack),i&&"fp_white"!==i||(i=n.white);const a=["hy-hero",`hy-hero--${o}`,`hy-hero--${this.heroGroupType}`,`hy-hero--${i}`,`hy-hero--${this.sizeVariant}`,this.hasShortcuts?"has-shortcuts":""],l=["hy-hero__title","hy-heading__hero"].join(" ");if("front_page"===o&&"full-image"!==this.sizeVariant)return t(h,null,t("div",{class:a.join(" ")},t("div",{class:"hy-hero__container"},this.createImageElement(this,this._sourceSet,{"--aspect-ratio":"16 / 10"}),t("div",{class:"hy-hero__spacer-box"}),t("div",{class:"hy-hero__content-container"},t("div",{class:"hy-hero__content"},t("div",{class:"hy-hero__title-container"},t("h2",{innerHTML:this.heading,class:l})),this.description&&t("p",{class:"hy-hero__description"},this.description),this.url&&t("div",{class:"hy-hero__actions"},t("hy-cta-button",{"link-content":this.urlTitle,"sc-label":this.scLabel,url:this.url,"is-external":this.isExternal,variant:e})))))),t("hy-box",{mb:"2, 2, 1, 1"}));if("full-image"===this.sizeVariant){const e=this.isExternal?"_blank":"_self";return t("div",{class:"hy-hero hy-hero--full-image"},t("div",{class:"hy-hero__container"},this.createImageElement(this,this._sourceSet,{"--aspect-ratio":"16 / 8"}),t("div",{class:"hy-hero__content-container"},t("div",{class:"hy-hero__content","data-text-color":this.heroTextColor},this.subtitle&&t("span",{class:"hy-hero__subtitle"},this.subtitle),t("h2",{innerHTML:this.heading,class:l}),this.description&&t("p",{class:"hy-hero__description"},this.description),this.url&&t("div",{class:"hy-hero__actions"},t("a",{class:"hy-hero__link",href:this.url,"aria-label":this.scLabel,target:e,"data-text-color":this.heroTextColor},this.urlTitle,t("hy-icon",{icon:"hy-icon-arrow-right",size:16})))))))}return t(h,null,t("div",{class:a.join(" ")},t("div",{class:"hy-hero__container"},this.createImageElement(this,this._sourceSet,{"--aspect-ratio":"16 / 10"}),t("div",{class:"hy-hero__content-container"},t("div",{class:"hy-hero__content"},t("div",{class:"hy-hero__title-container"},t("h2",{innerHTML:this.heading,class:l})),this.description&&t("p",{class:"hy-hero__description"},this.description),this.url&&t("div",{class:"hy-hero__actions"},t("hy-cta-button",{"link-content":this.urlTitle,"sc-label":this.scLabel,url:this.url,"is-external":this.isExternal,variant:e})))))),t("hy-box",{mb:"2, 2, 1, 1"}))}get el(){return i(this)}};g.style='*{-webkit-box-sizing:border-box;box-sizing:border-box}:host{display:block}.hy-hero{position:relative;padding-bottom:0;}@media (min-width: 60rem){.hy-hero:not(.hy-hero--full-image){margin-top:32px}}@media (min-width: 60rem){.hy-hero:not(.has-shortcuts){margin-bottom:32px}}@media (min-width: 75.0625rem){.without-sidebar .hy-hero{max-width:1216px;margin-right:auto;margin-left:auto}}@media (min-width: 75.0625rem){.with-sidebar:not(.hy-hero--full-image) .hy-hero{padding-left:32px;padding-right:32px}}@media (min-width: 1601px){.with-sidebar:not(.hy-hero--full-image) .hy-hero{padding-right:0;padding-left:0;max-width:1216px;margin-right:auto;margin-left:auto}}.hy-hero--full-image{--dark-bg:rgba(0, 0, 0, 0.55);--light-bg:rgba(255, 255, 255, 0.5);--dark-text:var(--brand-main-nearly-black);--light-text:var(--grayscale-white);border-bottom:1px solid var(--grayscale-medium-dark)}@media (min-width: 60rem){.hy-hero--full-image{border-bottom:4px solid var(--grayscale-black);margin-left:-2rem;margin-right:-2rem}}@media (min-width: 75.0625rem){.without-sidebar .hy-hero--full-image{max-width:none;margin-left:-2rem;margin-right:-2rem}}.hy-hero--full-image .hy-hero__container{grid-template-columns:repeat(4, 1fr);grid-template-rows:1fr}.hy-hero--full-image .hy-hero__image-container{grid-column:1/-1;grid-row:1/-1;-o-object-fit:cover;object-fit:cover;padding:0;width:100%}.hy-hero--full-image .hy-hero__image-container img{aspect-ratio:16/8}.hy-hero--full-image .hy-hero__content-container{padding:0}@media (min-width: 60rem){.hy-hero--full-image .hy-hero__content-container{align-self:center;grid-column:1/3;grid-row:1/-1;margin-left:32px;max-width:95%;z-index:2}}@media (min-width: 75.0625rem){.hy-hero--full-image .hy-hero__content-container{margin-left:0}}.hy-hero--full-image .hy-hero__content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:24px;padding:16px 16px 32px 16px}@media (min-width: 60rem){.hy-hero--full-image .hy-hero__content{margin-left:32px;gap:24px;padding:32px}}@media (min-width: 75.0625rem){.hy-hero--full-image .hy-hero__content{margin-left:64px;gap:32px}}@media (min-width: 1601px){.hy-hero--full-image .hy-hero__content{margin-left:96px}}.hy-hero--full-image .hy-hero__content[data-text-color=dark_text_light_bg]{-webkit-backdrop-filter:blur(250px);backdrop-filter:blur(250px);background-color:var(--grayscale-white);color:var(--dark-text)}@media (min-width: 60rem){.hy-hero--full-image .hy-hero__content[data-text-color=dark_text_light_bg]{background:var(--light-bg)}}.hy-hero--full-image .hy-hero__content[data-text-color=light_text_dark_bg]{-webkit-backdrop-filter:blur(250px);backdrop-filter:blur(250px);background:var(--grayscale-black);color:var(--light-text)}@media (min-width: 60rem){.hy-hero--full-image .hy-hero__content[data-text-color=light_text_dark_bg]{background:var(--dark-bg)}}.hy-hero--full-image .hy-hero__content[data-text-color=dark_text_no_bg]{background-color:var(--grayscale-white);color:var(--dark-text)}@media (min-width: 60rem){.hy-hero--full-image .hy-hero__content[data-text-color=dark_text_no_bg]{background:transparent;text-shadow:0 0 5px var(--grayscale-white)}}.hy-hero--full-image .hy-hero__content[data-text-color=light_text_no_bg]{background-color:var(--grayscale-black);color:var(--light-text)}@media (min-width: 60rem){.hy-hero--full-image .hy-hero__content[data-text-color=light_text_no_bg]{background:transparent;text-shadow:0 0 5px var(--grayscale-black)}}.hy-hero--full-image .hy-hero__subtitle{font-family:var(--main-font-family);font-size:18px;font-weight:700;line-height:1.2;position:relative}.hy-hero--full-image .hy-hero__subtitle::after{aspect-ratio:1;background-color:currentColor;bottom:-10px;content:"";display:block;height:4px;left:0;position:absolute;width:64px}@media (min-width: 60rem){.hy-hero--full-image .hy-hero__subtitle{font-size:20px}}.hy-hero--full-image h2.hy-hero__title.hy-heading__hero{color:inherit !important;font-family:var(--main-font-family);font-size:32px;font-weight:700;line-height:1.2}@media (min-width: 75.0625rem){.hy-hero--full-image h2.hy-hero__title.hy-heading__hero{font-size:36px}}@media (min-width: 1601px){.hy-hero--full-image h2.hy-hero__title.hy-heading__hero{font-size:64px}}.hy-hero--full-image .hy-hero__description{font-family:var(--main-font-family);font-size:16px;font-weight:400;line-height:1.5;margin:0;padding:0}@media (min-width: 1601px){.hy-hero--full-image .hy-hero__description{font-size:17px}}.hy-hero--full-image .hy-hero__actions{margin:0}.hy-hero--full-image .hy-hero__actions .hy-hero__link{--light-bg:var(--grayscale-white);--dark-bg:var(--grayscale-black);--light-text:var(--grayscale-white);--dark-text:var(--grayscale-black);-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--main-font-family);font-size:16px;font-weight:700;gap:8px;line-height:18px;padding:13px 16px;text-decoration:none;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.hy-hero--full-image .hy-hero__actions .hy-hero__link:hover{text-decoration:underline}.hy-hero--full-image .hy-hero__actions .hy-hero__link svg{width:16px;height:16px}.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=dark_text_light_bg]{background:var(--dark-bg);color:var(--light-text)}.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=dark_text_light_bg] svg{fill:var(--light-text)}.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=light_text_dark_bg]{background:var(--light-bg);color:var(--dark-text)}.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=light_text_dark_bg] svg{fill:var(--dark-text)}.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=dark_text_no_bg]{background:var(--dark-bg);color:var(--light-text);text-shadow:none}.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=dark_text_no_bg] svg{fill:var(--light-text)}.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=light_text_no_bg]{background:var(--light-bg);color:var(--dark-text);text-shadow:none}.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=light_text_no_bg] svg{fill:var(--dark-text)}.hy-hero--full-image .hy-image__image{-o-object-fit:cover;object-fit:cover}@media (min-width: 60rem){.hy-hero--white{margin-top:0}}@media (min-width: 60rem){.hy-hero--white:not(.has-shortcuts){padding-bottom:48px}}.hy-hero--white:not(.has-shortcuts):after{width:100%;background-color:var(--grayscale-medium-dark);height:1px;content:"";margin:0 auto;display:block}@media (min-width: 60rem){.hy-hero--white:not(.has-shortcuts):after{position:absolute;left:0;right:0;bottom:0}}.hy-hero--white:not(.hy-hero--front_page):after{max-width:1216px}.hy-hero__container{position:relative}@media (min-width: 60rem){.hy-hero__container{display:grid;position:relative}}@media (min-width: 60rem){.hy-hero--small .hy-hero__container{grid-template-columns:60% 1fr}}@media (min-width: 60rem){.hy-hero--large .hy-hero__container{grid-template-columns:repeat(2, 1fr)}}.hy-hero__content-container{padding:24px 1rem 40px;margin:0 auto;width:100%}@media (min-width: 30rem){.hy-hero__content-container{padding:40px 2rem}}@media (min-width: 75.0625rem){.hy-hero__content-container{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;padding:40px 24px}}@media (min-width: 1601px){.hy-hero__content-container{max-width:1216px}}.hy-hero--black .hy-hero__content-container{background-color:var(--grayscale-black)}.hy-hero--blue .hy-hero__content-container{background-color:var(--brand-main)}.hy-hero--white .hy-hero__content-container{background-color:var(--grayscale-white)}@media (min-width: 75.0625rem){.hy-hero--white .hy-hero__content-container{padding:40px 24px 40px 0}}.hy-hero__content{position:relative}h2.hy-hero__title{-ms-hyphens:auto;hyphens:auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;max-width:100%;width:auto}.hy-hero--blue h2.hy-hero__title{color:var(--grayscale-white) !important}.hy-hero--black h2.hy-hero__title{color:var(--grayscale-white) !important}.hy-hero--white h2.hy-hero__title{color:var(--grayscale-black) !important}h2.hy-hero__title.hy-heading__hero{color:var(--ds-palette-black-95);font-family:var(--ds-fontFamily-heading);font-size:var(--ds-fontSize-32);font-weight:var(--ds-fontWeight-bold);letter-spacing:var(--ds-letterSpacing-tight);line-height:36px;font-stretch:var(--ds-fontWidth-normal);text-transform:none;letter-spacing:-0.8px;margin-bottom:0;text-transform:none;text-wrap:balance}@media (min-width: 60rem){h2.hy-hero__title.hy-heading__hero{font-size:var(--ds-fontSize-48);line-height:52px;font-stretch:var(--ds-fontWidth-condense)}}.hy-hero__description{color:inherit;font-family:var(--ds-fontFamily-body);font-size:var(--ds-fontSize-18);font-weight:var(--ds-fontWeight-regular);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large);margin:16px 0 0 0;padding:0;position:relative;text-wrap:pretty}@media (min-width: 60rem){.hy-hero__description{font-size:var(--ds-fontSize-20)}}@media (min-width: 1601px){.hy-hero__description{font-size:1.0625rem;line-height:26px}}.hy-hero--black .hy-hero__description{color:var(--grayscale-white)}.hy-hero--blue .hy-hero__description{color:var(--grayscale-white)}.hy-hero--white .hy-hero__description{color:var(--grayscale-black)}.hy-hero__actions{margin-top:24px}.hy-hero__image-container{margin:0;padding:0;position:relative}.hy-hero__image-container figure{margin:0}@media (min-width: 60rem){.hy-hero__image-container{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;padding:8px 0}}@media (min-width: 60rem){.hy-hero--front_page .hy-hero__image-container{padding:0}}.hy-image__image{aspect-ratio:var(--aspect-ratio);display:block;height:100%;min-height:205px;-o-object-fit:contain;object-fit:contain;width:100%}.has-cover .hy-image__image{-o-object-fit:cover;object-fit:cover}.hy-hero.hy-hero--group_landing.hy-hero--generic_site_group h2.hy-hero__title.hy-heading__hero,.hy-hero.hy-hero--research_group h2.hy-hero__title.hy-heading__hero{color:var(--ds-palette-black-95);font-family:var(--ds-fontFamily-heading);font-size:var(--ds-fontSize-32);font-weight:var(--ds-fontWeight-bold);letter-spacing:var(--ds-letterSpacing-tight);line-height:36px;font-stretch:var(--ds-fontWidth-normal);text-transform:none;margin-bottom:0}@media (min-width: 60rem){.hy-hero.hy-hero--group_landing.hy-hero--generic_site_group h2.hy-hero__title.hy-heading__hero,.hy-hero.hy-hero--research_group h2.hy-hero__title.hy-heading__hero{font-size:var(--ds-fontSize-48);line-height:52px;font-stretch:var(--ds-fontWidth-condense)}}@media (min-width: 60rem){.hy-hero.hy-hero--front_page.hy-hero--white{padding-top:40px;margin-top:0}}.hy-hero.hy-hero--front_page h2.hy-hero__title.hy-heading__hero{color:var(--ds-palette-black-95);font-family:var(--ds-fontFamily-heading);font-size:var(--ds-fontSize-32);font-weight:var(--ds-fontWeight-bold);letter-spacing:var(--ds-letterSpacing-tight);line-height:36px;font-stretch:var(--ds-fontWidth-normal);text-transform:none;letter-spacing:-0.8px;margin-bottom:0}@media (min-width: 60rem){.hy-hero.hy-hero--front_page h2.hy-hero__title.hy-heading__hero{font-size:var(--ds-fontSize-48);line-height:52px;font-stretch:var(--ds-fontWidth-condense)}}@media (min-width: 75.0625rem){.hy-hero.hy-hero--front_page{margin-left:-32px;margin-right:-32px;max-width:none}}.hy-hero.hy-hero--front_page .hy-hero__container{position:relative}@media (min-width: 60rem){.hy-hero.hy-hero--front_page .hy-hero__container{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}}.hy-hero.hy-hero--front_page .hy-hero__content-container{padding:24px 1rem 40px;margin:0 auto;width:100%;min-height:clamp(330px, 50%, 675px)}.hy-hero--black .hy-hero.hy-hero--front_page .hy-hero__content-container{background-color:var(--grayscale-black)}.hy-hero--blue .hy-hero.hy-hero--front_page .hy-hero__content-container{background-color:var(--brand-main)}.hy-hero--white .hy-hero.hy-hero--front_page .hy-hero__content-container{background-color:var(--grayscale-white)}@media (min-width: 30rem){.hy-hero.hy-hero--front_page .hy-hero__content-container{padding:24px 2rem 40px}}@media (min-width: 60rem){.hy-hero.hy-hero--front_page .hy-hero__content-container{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;min-height:330px;padding:56px 2rem}}@media (min-width: 1060px){.hy-hero.hy-hero--front_page .hy-hero__content-container{min-height:373px}}@media (min-width: 1160px){.hy-hero.hy-hero--front_page .hy-hero__content-container{min-height:480px}}@media (min-width: 75.0625rem){.hy-hero.hy-hero--front_page .hy-hero__content-container{padding-left:32px;padding-right:8px}}@media (min-width: 1260px){.hy-hero.hy-hero--front_page .hy-hero__content-container{min-height:443px}}@media (min-width: 1280px){.hy-hero.hy-hero--front_page .hy-hero__content-container{max-width:1216px;padding-left:0}}@media (min-width: 1360px){.hy-hero.hy-hero--front_page .hy-hero__content-container{min-height:478px}}@media (min-width: 1460px){.hy-hero.hy-hero--front_page .hy-hero__content-container{min-height:513px}}@media (min-width: 1560px){.hy-hero.hy-hero--front_page .hy-hero__content-container{min-height:548px}}@media (min-width: 1601px){.hy-hero.hy-hero--front_page .hy-hero__content-container{padding-left:0}}@media (min-width: 1660px){.hy-hero.hy-hero--front_page .hy-hero__content-container{min-height:583px}}@media (min-width: 1760px){.hy-hero.hy-hero--front_page .hy-hero__content-container{min-height:619px}}@media (min-width: 1860px){.hy-hero.hy-hero--front_page .hy-hero__content-container{min-height:654px}}@media (min-width: 1920px){.hy-hero.hy-hero--front_page .hy-hero__content-container{min-height:675px}}@media (min-width: 60rem){.hy-hero.hy-hero--front_page.hy-hero--small .hy-hero__image-container{width:40%}}@media (min-width: 60rem){.hy-hero.hy-hero--front_page.hy-hero--small .hy-hero__content{max-width:60%}}@media (min-width: 60rem){.hy-hero.hy-hero--front_page.hy-hero--large .hy-hero__image-container{width:50%}}@media (min-width: 60rem){.hy-hero.hy-hero--front_page.hy-hero--large .hy-hero__content{max-width:50%}}.hy-hero.hy-hero--front_page .hy-hero__image-container{background-position:50% 50%;background-size:cover;background:transparent;margin:0;padding:0;position:relative}.hy-hero.hy-hero--front_page .hy-hero__image-container figure{margin:0}@media (min-width: 60rem){.hy-hero.hy-hero--front_page .hy-hero__image-container{background-color:var(--grayscale-white);bottom:0;-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;padding:8px 0;position:absolute;right:0;top:0}}.hy-hero.hy-hero--front_page .hy-hero__content{position:relative}@media (min-width: 60rem){.hy-hero.hy-hero--front_page .hy-hero__content{padding-right:24px}}.hy-hero.hy-hero--front_page .hy-image__image{display:block;height:100%;min-height:205px;-o-object-fit:cover;object-fit:cover;width:100%}.hy-hero__spacer-box{display:none}@media (min-width: 60rem){.hy-hero__spacer-box{display:block;-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;position:absolute;inset:0}}@media (min-width: 60rem){.hy-hero--small .hy-hero__spacer-box{width:60%}}@media (min-width: 60rem){.hy-hero--large .hy-hero__spacer-box{width:50%}}.hy-hero--black .hy-hero__spacer-box{background-color:var(--grayscale-black)}.hy-hero--blue .hy-hero__spacer-box{background-color:var(--brand-main)}.hy-hero--white .hy-hero__spacer-box{background-color:var(--grayscale-white)}';export{g as hy_hero}
|
|
1
|
+
import{r as e,h as t,H as h,g as i}from"./index-2ffe17c9.js";import{j as o}from"./globalScript-7f6ce018.js";import{H as r,a,b as n,c as l,d}from"./utils-1e7f5184.js";const g=class{constructor(t){e(this,t),this.heroType=r.landing,this.heroGroupType=a.default,this.colorVariant=n.blue,this.sizeVariant=l.large,this.heroTextColor=null,this.image=void 0,this.imageHeight=null,this.imageWidth=null,this.imageAltText="",this.disableLazy=!1,this.hasShortcuts=!1,this.heading=void 0,this.description=void 0,this.subtitle=void 0,this.url=void 0,this.urlTitle=void 0,this.scLabel=void 0,this.isExternal=!1,this.sourceSet=void 0}async componentWillLoad(){this._sourceSet=await o(this.sourceSet)}createImageElement(e,h,i){return t("div",{class:"hy-hero__image-container",style:i},e.image&&(h?t("picture",null,h.map((e=>t("source",{srcSet:e.src,media:e.media,type:e.type,sizes:e.sizes?e.sizes:""}))),t("img",{loading:e.disableLazy?"eager":"lazy",alt:e.imageAltText,class:"hy-image__image",src:e.image,height:e.imageHeight,width:e.imageWidth})):t("img",{loading:e.disableLazy?"eager":"lazy",alt:e.imageAltText,class:"hy-image__image",src:e.image,height:e.imageHeight,width:e.imageWidth})))}render(){let e=d.heroWhite,i=this.colorVariant,o=this.heroType;"minor_landing"===this.heroType&&(i=n.white,o=r.landing),i===n.blue&&(e=d.heroBlue),i===n.black&&(e=d.heroBlack),i&&"fp_white"!==i||(i=n.white);const a=["hy-hero",`hy-hero--${o}`,`hy-hero--${this.heroGroupType}`,`hy-hero--${i}`,`hy-hero--${this.sizeVariant}`,this.hasShortcuts?"has-shortcuts":""],l=["hy-hero__title","hy-heading__hero"].join(" ");if("front_page"===o&&"full-image"!==this.sizeVariant)return t(h,null,t("div",{class:a.join(" ")},t("div",{class:"hy-hero__container"},this.createImageElement(this,this._sourceSet,{"--aspect-ratio":"16 / 10"}),t("div",{class:"hy-hero__spacer-box"}),t("div",{class:"hy-hero__content-container"},t("div",{class:"hy-hero__content"},t("div",{class:"hy-hero__title-container"},t("h2",{innerHTML:this.heading,class:l})),this.description&&t("p",{class:"hy-hero__description"},this.description),this.url&&t("div",{class:"hy-hero__actions"},t("hy-cta-button",{"link-content":this.urlTitle,"sc-label":this.scLabel,url:this.url,"is-external":this.isExternal,variant:e})))))),t("hy-box",{mb:"2, 2, 1, 1"}));if("full-image"===this.sizeVariant){const e=this.isExternal?"_blank":"_self";return t("div",{class:"hy-hero hy-hero--full-image"},t("div",{class:"hy-hero__container"},this.createImageElement(this,this._sourceSet,{"--aspect-ratio":"16 / 8"}),t("div",{class:"hy-hero__content-container"},t("div",{class:"hy-hero__content","data-text-color":this.heroTextColor},this.subtitle&&t("span",{class:"hy-hero__subtitle"},this.subtitle),t("h2",{innerHTML:this.heading,class:l}),this.description&&t("p",{class:"hy-hero__description"},this.description),this.url&&t("div",{class:"hy-hero__actions"},t("a",{class:"hy-hero__link",href:this.url,"aria-label":this.scLabel,target:e,"data-text-color":this.heroTextColor},this.urlTitle,t("hy-icon",{icon:"hy-icon-arrow-right",size:16})))))))}return t(h,null,t("div",{class:a.join(" ")},t("div",{class:"hy-hero__container"},this.createImageElement(this,this._sourceSet,{"--aspect-ratio":"16 / 10"}),t("div",{class:"hy-hero__content-container"},t("div",{class:"hy-hero__content"},t("div",{class:"hy-hero__title-container"},t("h2",{innerHTML:this.heading,class:l})),this.description&&t("p",{class:"hy-hero__description"},this.description),this.url&&t("div",{class:"hy-hero__actions"},t("hy-cta-button",{"link-content":this.urlTitle,"sc-label":this.scLabel,url:this.url,"is-external":this.isExternal,variant:e})))))),t("hy-box",{mb:"2, 2, 1, 1"}))}get el(){return i(this)}};g.style='*{-webkit-box-sizing:border-box;box-sizing:border-box}:host{display:block}.hy-hero{position:relative;padding-bottom:0;}@media (min-width: 60rem){.hy-hero:not(.hy-hero--full-image){margin-top:32px}}@media (min-width: 60rem){.hy-hero:not(.has-shortcuts){margin-bottom:32px}}@media (min-width: 75.0625rem){.without-sidebar .hy-hero{max-width:1216px;margin-right:auto;margin-left:auto}}@media (min-width: 75.0625rem){.with-sidebar:not(.hy-hero--full-image) .hy-hero{padding-left:32px;padding-right:32px}}@media (min-width: 1601px){.with-sidebar:not(.hy-hero--full-image) .hy-hero{padding-right:0;padding-left:0;max-width:1216px;margin-right:auto;margin-left:auto}}.hy-hero--full-image{--dark-bg:rgba(0, 0, 0, 0.55);--light-bg:rgba(255, 255, 255, 0.95);--dark-text:var(--brand-main-nearly-black);--light-text:var(--grayscale-white);border-bottom:1px solid var(--grayscale-medium-dark)}@media (min-width: 60rem){.hy-hero--full-image{border-bottom:4px solid var(--grayscale-black);margin-left:-2rem;margin-right:-2rem}}@media (min-width: 75.0625rem){.without-sidebar .hy-hero--full-image{max-width:none;margin-left:-2rem;margin-right:-2rem}}.hy-hero--full-image .hy-hero__container{grid-template-columns:repeat(4, 1fr);grid-template-rows:1fr}.hy-hero--full-image .hy-hero__image-container{grid-column:1/-1;grid-row:1/-1;-o-object-fit:cover;object-fit:cover;padding:0;width:100%}.hy-hero--full-image .hy-hero__image-container img{aspect-ratio:16/8}.hy-hero--full-image .hy-hero__content-container{padding:0}@media (min-width: 60rem){.hy-hero--full-image .hy-hero__content-container{align-self:center;grid-column:1/3;grid-row:1/-1;margin-left:32px;max-width:95%;z-index:2}}@media (min-width: 75.0625rem){.hy-hero--full-image .hy-hero__content-container{margin-left:0}}.hy-hero--full-image .hy-hero__content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:24px;padding:16px 16px 32px 16px}@media (min-width: 60rem){.hy-hero--full-image .hy-hero__content{margin-left:32px;gap:24px;padding:32px}}@media (min-width: 75.0625rem){.hy-hero--full-image .hy-hero__content{margin-left:64px;gap:32px}}@media (min-width: 1601px){.hy-hero--full-image .hy-hero__content{margin-left:96px}}.hy-hero--full-image .hy-hero__content[data-text-color=dark_text_light_bg]{-webkit-backdrop-filter:blur(250px);backdrop-filter:blur(250px);background-color:var(--grayscale-white);color:var(--dark-text)}@media (min-width: 60rem){.hy-hero--full-image .hy-hero__content[data-text-color=dark_text_light_bg]{background:var(--light-bg)}}.hy-hero--full-image .hy-hero__content[data-text-color=light_text_dark_bg]{-webkit-backdrop-filter:blur(250px);backdrop-filter:blur(250px);background:var(--grayscale-black);color:var(--light-text)}@media (min-width: 60rem){.hy-hero--full-image .hy-hero__content[data-text-color=light_text_dark_bg]{background:var(--dark-bg)}}.hy-hero--full-image .hy-hero__content[data-text-color=dark_text_no_bg]{background-color:var(--grayscale-white);color:var(--dark-text)}@media (min-width: 60rem){.hy-hero--full-image .hy-hero__content[data-text-color=dark_text_no_bg]{background:transparent;text-shadow:0 0 5px var(--grayscale-white)}}.hy-hero--full-image .hy-hero__content[data-text-color=light_text_no_bg]{background-color:var(--grayscale-black);color:var(--light-text)}@media (min-width: 60rem){.hy-hero--full-image .hy-hero__content[data-text-color=light_text_no_bg]{background:transparent;text-shadow:0 0 5px var(--grayscale-black)}}.hy-hero--full-image .hy-hero__subtitle{font-family:var(--main-font-family);font-size:18px;font-weight:700;line-height:1.2;position:relative}.hy-hero--full-image .hy-hero__subtitle::after{aspect-ratio:1;background-color:currentColor;bottom:-10px;content:"";display:block;height:4px;left:0;position:absolute;width:64px}@media (min-width: 60rem){.hy-hero--full-image .hy-hero__subtitle{font-size:20px}}.hy-hero--full-image h2.hy-hero__title.hy-heading__hero{color:inherit !important;font-family:var(--main-font-family);font-size:32px;font-weight:700;line-height:1.2}@media (min-width: 75.0625rem){.hy-hero--full-image h2.hy-hero__title.hy-heading__hero{font-size:36px}}@media (min-width: 1601px){.hy-hero--full-image h2.hy-hero__title.hy-heading__hero{font-size:64px}}.hy-hero--full-image .hy-hero__description{font-family:var(--main-font-family);font-size:16px;font-weight:400;line-height:1.5;margin:0;padding:0}@media (min-width: 1601px){.hy-hero--full-image .hy-hero__description{font-size:17px}}.hy-hero--full-image .hy-hero__actions{margin:0}.hy-hero--full-image .hy-hero__actions .hy-hero__link{--light-bg:var(--grayscale-white);--dark-bg:var(--grayscale-black);--light-text:var(--grayscale-white);--dark-text:var(--grayscale-black);-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--main-font-family);font-size:16px;font-weight:700;gap:8px;line-height:18px;padding:13px 16px;text-decoration:none;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.hy-hero--full-image .hy-hero__actions .hy-hero__link:hover{text-decoration:underline}.hy-hero--full-image .hy-hero__actions .hy-hero__link svg{width:16px;height:16px}.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=dark_text_light_bg]{background:var(--dark-bg);color:var(--light-text)}.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=dark_text_light_bg] svg{fill:var(--light-text)}.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=light_text_dark_bg]{background:var(--light-bg);color:var(--dark-text)}.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=light_text_dark_bg] svg{fill:var(--dark-text)}.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=dark_text_no_bg]{background:var(--dark-bg);color:var(--light-text);text-shadow:none}.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=dark_text_no_bg] svg{fill:var(--light-text)}.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=light_text_no_bg]{background:var(--light-bg);color:var(--dark-text);text-shadow:none}.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=light_text_no_bg] svg{fill:var(--dark-text)}.hy-hero--full-image .hy-image__image{-o-object-fit:cover;object-fit:cover}@media (min-width: 60rem){.hy-hero--white{margin-top:0}}@media (min-width: 60rem){.hy-hero--white:not(.has-shortcuts){padding-bottom:48px}}.hy-hero--white:not(.has-shortcuts):after{width:100%;background-color:var(--grayscale-medium-dark);height:1px;content:"";margin:0 auto;display:block}@media (min-width: 60rem){.hy-hero--white:not(.has-shortcuts):after{position:absolute;left:0;right:0;bottom:0}}.hy-hero--white:not(.hy-hero--front_page):after{max-width:1216px}.hy-hero__container{position:relative}@media (min-width: 60rem){.hy-hero__container{display:grid;position:relative}}@media (min-width: 60rem){.hy-hero--small .hy-hero__container{grid-template-columns:60% 1fr}}@media (min-width: 60rem){.hy-hero--large .hy-hero__container{grid-template-columns:repeat(2, 1fr)}}.hy-hero__content-container{padding:24px 1rem 40px;margin:0 auto;width:100%}@media (min-width: 30rem){.hy-hero__content-container{padding:40px 2rem}}@media (min-width: 75.0625rem){.hy-hero__content-container{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;padding:40px 24px}}@media (min-width: 1601px){.hy-hero__content-container{max-width:1216px}}.hy-hero--black .hy-hero__content-container{background-color:var(--grayscale-black)}.hy-hero--blue .hy-hero__content-container{background-color:var(--brand-main)}.hy-hero--white .hy-hero__content-container{background-color:var(--grayscale-white)}@media (min-width: 75.0625rem){.hy-hero--white .hy-hero__content-container{padding:40px 24px 40px 0}}.hy-hero__content{position:relative}h2.hy-hero__title{-ms-hyphens:auto;hyphens:auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;max-width:100%;width:auto}.hy-hero--blue h2.hy-hero__title{color:var(--grayscale-white) !important}.hy-hero--black h2.hy-hero__title{color:var(--grayscale-white) !important}.hy-hero--white h2.hy-hero__title{color:var(--grayscale-black) !important}h2.hy-hero__title.hy-heading__hero{color:var(--ds-palette-black-95);font-family:var(--ds-fontFamily-heading);font-size:var(--ds-fontSize-32);font-weight:var(--ds-fontWeight-bold);letter-spacing:var(--ds-letterSpacing-tight);line-height:36px;font-stretch:var(--ds-fontWidth-normal);text-transform:none;letter-spacing:-0.8px;margin-bottom:0;text-transform:none;text-wrap:balance}@media (min-width: 60rem){h2.hy-hero__title.hy-heading__hero{font-size:var(--ds-fontSize-48);line-height:52px;font-stretch:var(--ds-fontWidth-condense)}}.hy-hero__description{color:inherit;font-family:var(--ds-fontFamily-body);font-size:var(--ds-fontSize-18);font-weight:var(--ds-fontWeight-regular);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large);margin:16px 0 0 0;padding:0;position:relative;text-wrap:pretty}@media (min-width: 60rem){.hy-hero__description{font-size:var(--ds-fontSize-20)}}@media (min-width: 1601px){.hy-hero__description{font-size:1.0625rem;line-height:26px}}.hy-hero--black .hy-hero__description{color:var(--grayscale-white)}.hy-hero--blue .hy-hero__description{color:var(--grayscale-white)}.hy-hero--white .hy-hero__description{color:var(--grayscale-black)}.hy-hero__actions{margin-top:24px}.hy-hero__image-container{margin:0;padding:0;position:relative}.hy-hero__image-container figure{margin:0}@media (min-width: 60rem){.hy-hero__image-container{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;padding:8px 0}}@media (min-width: 60rem){.hy-hero--front_page .hy-hero__image-container{padding:0}}.hy-image__image{aspect-ratio:var(--aspect-ratio);display:block;height:100%;min-height:205px;-o-object-fit:contain;object-fit:contain;width:100%}.has-cover .hy-image__image{-o-object-fit:cover;object-fit:cover}.hy-hero.hy-hero--group_landing.hy-hero--generic_site_group h2.hy-hero__title.hy-heading__hero,.hy-hero.hy-hero--research_group h2.hy-hero__title.hy-heading__hero{color:var(--ds-palette-black-95);font-family:var(--ds-fontFamily-heading);font-size:var(--ds-fontSize-32);font-weight:var(--ds-fontWeight-bold);letter-spacing:var(--ds-letterSpacing-tight);line-height:36px;font-stretch:var(--ds-fontWidth-normal);text-transform:none;margin-bottom:0}@media (min-width: 60rem){.hy-hero.hy-hero--group_landing.hy-hero--generic_site_group h2.hy-hero__title.hy-heading__hero,.hy-hero.hy-hero--research_group h2.hy-hero__title.hy-heading__hero{font-size:var(--ds-fontSize-48);line-height:52px;font-stretch:var(--ds-fontWidth-condense)}}@media (min-width: 60rem){.hy-hero.hy-hero--front_page.hy-hero--white{padding-top:40px;margin-top:0}}.hy-hero.hy-hero--front_page h2.hy-hero__title.hy-heading__hero{color:var(--ds-palette-black-95);font-family:var(--ds-fontFamily-heading);font-size:var(--ds-fontSize-32);font-weight:var(--ds-fontWeight-bold);letter-spacing:var(--ds-letterSpacing-tight);line-height:36px;font-stretch:var(--ds-fontWidth-normal);text-transform:none;letter-spacing:-0.8px;margin-bottom:0}@media (min-width: 60rem){.hy-hero.hy-hero--front_page h2.hy-hero__title.hy-heading__hero{font-size:var(--ds-fontSize-48);line-height:52px;font-stretch:var(--ds-fontWidth-condense)}}@media (min-width: 75.0625rem){.hy-hero.hy-hero--front_page{margin-left:-32px;margin-right:-32px;max-width:none}}.hy-hero.hy-hero--front_page .hy-hero__container{position:relative}@media (min-width: 60rem){.hy-hero.hy-hero--front_page .hy-hero__container{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}}.hy-hero.hy-hero--front_page .hy-hero__content-container{padding:24px 1rem 40px;margin:0 auto;width:100%;min-height:clamp(330px, 50%, 675px)}.hy-hero--black .hy-hero.hy-hero--front_page .hy-hero__content-container{background-color:var(--grayscale-black)}.hy-hero--blue .hy-hero.hy-hero--front_page .hy-hero__content-container{background-color:var(--brand-main)}.hy-hero--white .hy-hero.hy-hero--front_page .hy-hero__content-container{background-color:var(--grayscale-white)}@media (min-width: 30rem){.hy-hero.hy-hero--front_page .hy-hero__content-container{padding:24px 2rem 40px}}@media (min-width: 60rem){.hy-hero.hy-hero--front_page .hy-hero__content-container{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;min-height:330px;padding:56px 2rem}}@media (min-width: 1060px){.hy-hero.hy-hero--front_page .hy-hero__content-container{min-height:373px}}@media (min-width: 1160px){.hy-hero.hy-hero--front_page .hy-hero__content-container{min-height:480px}}@media (min-width: 75.0625rem){.hy-hero.hy-hero--front_page .hy-hero__content-container{padding-left:32px;padding-right:8px}}@media (min-width: 1260px){.hy-hero.hy-hero--front_page .hy-hero__content-container{min-height:443px}}@media (min-width: 1280px){.hy-hero.hy-hero--front_page .hy-hero__content-container{max-width:1216px;padding-left:0}}@media (min-width: 1360px){.hy-hero.hy-hero--front_page .hy-hero__content-container{min-height:478px}}@media (min-width: 1460px){.hy-hero.hy-hero--front_page .hy-hero__content-container{min-height:513px}}@media (min-width: 1560px){.hy-hero.hy-hero--front_page .hy-hero__content-container{min-height:548px}}@media (min-width: 1601px){.hy-hero.hy-hero--front_page .hy-hero__content-container{padding-left:0}}@media (min-width: 1660px){.hy-hero.hy-hero--front_page .hy-hero__content-container{min-height:583px}}@media (min-width: 1760px){.hy-hero.hy-hero--front_page .hy-hero__content-container{min-height:619px}}@media (min-width: 1860px){.hy-hero.hy-hero--front_page .hy-hero__content-container{min-height:654px}}@media (min-width: 1920px){.hy-hero.hy-hero--front_page .hy-hero__content-container{min-height:675px}}@media (min-width: 60rem){.hy-hero.hy-hero--front_page.hy-hero--small .hy-hero__image-container{width:40%}}@media (min-width: 60rem){.hy-hero.hy-hero--front_page.hy-hero--small .hy-hero__content{max-width:60%}}@media (min-width: 60rem){.hy-hero.hy-hero--front_page.hy-hero--large .hy-hero__image-container{width:50%}}@media (min-width: 60rem){.hy-hero.hy-hero--front_page.hy-hero--large .hy-hero__content{max-width:50%}}.hy-hero.hy-hero--front_page .hy-hero__image-container{background-position:50% 50%;background-size:cover;background:transparent;margin:0;padding:0;position:relative}.hy-hero.hy-hero--front_page .hy-hero__image-container figure{margin:0}@media (min-width: 60rem){.hy-hero.hy-hero--front_page .hy-hero__image-container{background-color:var(--grayscale-white);bottom:0;-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;padding:8px 0;position:absolute;right:0;top:0}}.hy-hero.hy-hero--front_page .hy-hero__content{position:relative}@media (min-width: 60rem){.hy-hero.hy-hero--front_page .hy-hero__content{padding-right:24px}}.hy-hero.hy-hero--front_page .hy-image__image{display:block;height:100%;min-height:205px;-o-object-fit:cover;object-fit:cover;width:100%}.hy-hero__spacer-box{display:none}@media (min-width: 60rem){.hy-hero__spacer-box{display:block;-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;position:absolute;inset:0}}@media (min-width: 60rem){.hy-hero--small .hy-hero__spacer-box{width:60%}}@media (min-width: 60rem){.hy-hero--large .hy-hero__spacer-box{width:50%}}.hy-hero--black .hy-hero__spacer-box{background-color:var(--grayscale-black)}.hy-hero--blue .hy-hero__spacer-box{background-color:var(--brand-main)}.hy-hero--white .hy-hero__spacer-box{background-color:var(--grayscale-white)}';export{g as hy_hero}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as t,H as a}from"./index-2ffe17c9.js";import{h as o}from"./utils-1e7f5184.js";const s=class{constructor(t){e(this,t),this.blockTitle=null,this.language=void 0,this.venueType="libraries",this.blockId=void 0,this.nextLabel=void 0,this.prevLabel=void 0,this.listLabel=void 0,this.buildingLabel=void 0,this.customerServiceLabel=void 0,this.date=null,this.dateTitle=null,this.dateType="day",this.multiple=!1,this.customLinkTitle=null,this.customLink=null,this.exceptional=!1}render(){const e=["hy-open-hours--container",this.exceptional?"hy-open-hours--container--exceptional":""].join(" "),s=["open-hours__content__top-label",this.venueType].join(" "),r=["open-hours__content__top-label building",this.venueType].join(" ");return t(a,{key:"f6f3415684392b415cdfd2ad02f1f2f929cc9681"},t("div",{key:"0cbdb3472c793ddaa3219a6a2ce81de0485b9650",class:e,"data-lang":this.language,"data-id":this.blockId,"data-date":this.date,"data-type":this.dateType,"data-multiple":this.multiple},this.blockTitle&&t("h3",{key:"f67b75961eead25f58945504e0b3d934f5e1f74b",class:"open-hours__title"},this.blockTitle),!this.exceptional&&t("div",{key:"9cb2735ffb336d2ea4c6373c17c5c83f44731383",class:"open-hours__date-change"},t("button",{key:"502b0fb12482079b76163c5cb603844e0a0f7a1e","aria-label":this.prevLabel,class:"icon--arrow-left open-hours__prev-date"},t("hy-icon",{key:"cda2e8886a4c776fbd3aa09ca89661805cad0247",icon:"hy-icon-caret-left",size:18})),t("span",{key:"1bd235948fea29cc1cf25c812140b087abc4f71f",class:"open-hours__date-change--title"},this.dateTitle),t("button",{key:"d5733be3decaab622a9cbcea7e4178613e22c90d","aria-label":this.nextLabel,class:"icon--arrow-right open-hours__next-date"},t("hy-icon",{key:"39b8ade2704b0b97ab25daee7f6795bbfff5d806",icon:"hy-icon-caret-right",size:18}))),t("div",{key:"0acd8e75614bc0c715d05a336612baf4feb549a1",class:"open-hours__content__top"},t("span",{key:"d6706b18af8b69dd659fab521948448ff4088818",class:s},this.listLabel),t("span",{key:"bae5faca109caeb73a64c471454f74a11fdb1dce",class:r},this.buildingLabel),this.customerServiceLabel&&t("span",{key:"05665bd69d13624bc899c2bda8788e10b19348a5",class:s},this.customerServiceLabel)),t("div",{key:"8409743f535e461ea79ac53d58bcdbfe92567bcd",class:"open-hours__content"},t("slot",{key:"d22774dc5cce96a24e79697bb8a787f0cf0be41f"})),this.customLink&&t("div",{key:"e77e28c2bb4a7420a8af63d601b90d868d1dad74",class:"open-hours__links"},t("hy-cta-link",{key:"a317216c011ea8c326482f737ed7eca6bfefe604","full-width":!0,"link-content":this.customLinkTitle,"sc-label":this.customLinkTitle,url:this.customLink,variant:o.linkList}))),t("hy-box",{key:"623243b1ae1181a7d8add2a6a7f567158132cbac",mb:"1.75, 1.75, 2, 2.5"}))}};s.style="*{-webkit-box-sizing:border-box;box-sizing:border-box}:host{display:block}.hy-open-hours--container{font-family:var(--main-font-family);max-width:50rem;overflow:hidden}.hy-open-hours--container--exceptional{max-width:100%}.open-hours__title{text-transform:uppercase;margin-bottom:0.75rem}.open-hours__date-change{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--grayscale-background-box);color:var(--brand-main);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.open-hours__date-change--title{font-size:1.25rem;line-height:24px;font-weight:700;color:var(--grayscale-black);font-family:var(--main-font-family);letter-spacing:-0.5px;text-align:center;text-transform:uppercase}.open-hours__date-change .open-hours__prev-date,.open-hours__date-change .open-hours__next-date{background:none;border:0;color:var(--brand-main);display:-webkit-box;display:-ms-flexbox;display:flex;height:44px;outline:5px solid var(--grayscale-white);position:relative;width:44px}.open-hours__date-change .open-hours__prev-date:hover,.open-hours__date-change .open-hours__next-date:hover{background-color:var(--hover-gray);color:var(--brand-main-active);cursor:pointer}.open-hours__date-change .open-hours__prev-date:focus,.open-hours__date-change .open-hours__next-date:focus{background-color:var(--hover-gray);color:var(--brand-main-active)}.open-hours__date-change .open-hours__prev-date:disabled,.open-hours__date-change .open-hours__next-date:disabled{cursor:none}.open-hours__date-change .open-hours__prev-date hy-icon,.open-hours__date-change .open-hours__next-date hy-icon{color:var(--link-blue);left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.open-hours__date-change .open-hours__prev-date svg,.open-hours__date-change .open-hours__next-date svg{fill:currentColor;height:20px;width:20px}.open-hours__date-change .open-hours__prev-date{border-right:1px solid var(--link-blue)}.open-hours__date-change .open-hours__next-date{border-left:1px solid var(--link-blue)}.open-hours__content__top{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;font-size:0.9rem;font-weight:700;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0.5rem 0}.open-hours__content__top-label{margin:0.5rem 0 0.5rem 0;text-align:left;width:33.3333333333vw;word-break:break-word}.open-hours__content__top-label:first-child(){margin-right:1rem}.open-hours__content__top-label.luomus{width:50vw}.open-hours__content__top-label.building.luomus{text-align:center}.open-hours__content{position:relative}.open-hours__content.open-hours__loading:after{-webkit-animation-duration:1s;animation-duration:1s;font-size:3.2rem;position:absolute;left:45%;top:35%;z-index:2}.open-hours__content.slide-left{-webkit-animation:slide-left 0.2s ease-in-out both;animation:slide-left 0.2s ease-in-out both}.open-hours__content.slide-left-reverse{-webkit-animation:slide-left-reverse 0.2s ease-in-out reverse both;animation:slide-left-reverse 0.2s ease-in-out reverse both}.open-hours__content.slide-right{-webkit-animation:slide-right 0.2s ease-in-out both;animation:slide-right 0.2s ease-in-out both}.open-hours__content.slide-right-reverse{-webkit-animation:slide-right-reverse 0.2s ease-in-out reverse both;animation:slide-right-reverse 0.2s ease-in-out reverse both}.open-hours__links{margin:1.5rem 0 1rem 0}.open-hours__links .open-hours__link .hy-cta-link{width:100% !important;-webkit-box-pack:start !important;-ms-flex-pack:start !important;justify-content:flex-start !important}.open-hours__links .open-hours__link .hy-cta-link .text{width:100% !important}@-webkit-keyframes slide-right{0%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}100%{-webkit-transform:translateX(200px);transform:translateX(200px);opacity:0}}@keyframes slide-right{0%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}100%{-webkit-transform:translateX(200px);transform:translateX(200px);opacity:0}}@-webkit-keyframes slide-right-reverse{0%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}100%{-webkit-transform:translateX(200px);transform:translateX(200px);opacity:0}}@keyframes slide-right-reverse{0%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}100%{-webkit-transform:translateX(200px);transform:translateX(200px);opacity:0}}@-webkit-keyframes slide-left{0%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}100%{-webkit-transform:translateX(-200px);transform:translateX(-200px);opacity:0}}@keyframes slide-left{0%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}100%{-webkit-transform:translateX(-200px);transform:translateX(-200px);opacity:0}}@-webkit-keyframes slide-left-reverse{0%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}100%{-webkit-transform:translateX(-200px);transform:translateX(-200px);opacity:0}}@keyframes slide-left-reverse{0%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}100%{-webkit-transform:translateX(-200px);transform:translateX(-200px);opacity:0}}";const r=class{constructor(t){e(this,t),this.multiple=!1,this.selfServiceLabel=null,this.venueType="libraries",this.dataItems=void 0}dataItemsWatcher(e){this._dataItems="string"==typeof e?JSON.parse(e):e}componentWillLoad(){this.dataItemsWatcher(this.dataItems)}render(){return t(a,{key:"00885a2c042415671c4679d9cd14701992f5ac0b"},this._dataItems.map((e=>{if(!e.service)return;const a=["open-hours__list-item",e.today?"open-hours__list-item--today":""].join(" ");return t("div",{class:a},t("span",{class:"open-hours__list-item--office"},e.today?e.today:e.dateLibrary),t("span",{class:"open-hours__list-item--hours"},e.building),t("span",{class:"open-hours__list-item--service"},e.service))})),this.selfServiceLabel&&t("div",{key:"2921d7bc78f58a45e10bfb2ce1e44c9fdbf56357",class:"open-hours__content__top"},t("span",{key:"4ec1c520d1731538ec6332fb26fe7abb9a23e7a3",class:"open-hours__content__top-label"},this.selfServiceLabel)),this._dataItems.map((e=>{if(e.service)return;const a=["open-hours__list-item",e.today?"open-hours__list-item--today":""].join(" "),o=["open-hours__list-item--hours",this.venueType].join(" "),s=["open-hours__list-item--office",this.venueType].join(" ");return t("div",{class:a},t("span",{class:s},e.today?e.today:e.dateLibrary),t("span",{class:o},e.building),"luomus"!==this.venueType&&t("span",{class:"open-hours__list-item--service"},"-"))})))}static get watchers(){return{dataItems:["dataItemsWatcher"]}}};r.style="*{-webkit-box-sizing:border-box;box-sizing:border-box}:host{display:block}.open-hours__list-item{border-top:1px solid var(--grayscale-medium);color:var(--grayscale-dark-text);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;font-size:0.875rem;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0.5rem 0;font-family:var(--main-font-family);text-align:start}.open-hours__list-item--today{background-color:var(--grayscale-light)}.open-hours__list-item--today span:first-child{margin-left:4px;padding-left:4px;margin-right:-8px;font-weight:bold;border-left:2px solid var(--grayscale-black)}.open-hours__list-item>span:not(.luomus){text-align:left;width:33.3333333333vw}.open-hours__list-item>span.luomus{width:50vw}.open-hours__list-item--date{margin-right:1rem}.open-hours__list-item--hours{margin-right:0.2rem}.open-hours__list-item--hours.luomus{text-align:center}";export{s as hy_opening_hours,r as hy_opening_hours_content}
|
|
1
|
+
import{r as e,h as t,H as a}from"./index-2ffe17c9.js";import{h as o}from"./utils-1e7f5184.js";const s=class{constructor(t){e(this,t),this.blockTitle=null,this.language=void 0,this.venueType="libraries",this.blockId=void 0,this.nextLabel=void 0,this.prevLabel=void 0,this.listLabel=void 0,this.buildingLabel=void 0,this.customerServiceLabel=void 0,this.date=null,this.dateTitle=null,this.dateType="day",this.multiple=!1,this.customLinkTitle=null,this.customLink=null,this.exceptional=!1}render(){const e=["hy-open-hours--container",this.exceptional?"hy-open-hours--container--exceptional":""].join(" "),s=["open-hours__content__top-label",this.venueType].join(" "),r=["open-hours__content__top-label building",this.venueType].join(" ");return t(a,{key:"f6f3415684392b415cdfd2ad02f1f2f929cc9681"},t("div",{key:"0cbdb3472c793ddaa3219a6a2ce81de0485b9650",class:e,"data-lang":this.language,"data-id":this.blockId,"data-date":this.date,"data-type":this.dateType,"data-multiple":this.multiple},this.blockTitle&&t("h3",{key:"f67b75961eead25f58945504e0b3d934f5e1f74b",class:"open-hours__title"},this.blockTitle),!this.exceptional&&t("div",{key:"9cb2735ffb336d2ea4c6373c17c5c83f44731383",class:"open-hours__date-change"},t("button",{key:"502b0fb12482079b76163c5cb603844e0a0f7a1e","aria-label":this.prevLabel,class:"icon--arrow-left open-hours__prev-date"},t("hy-icon",{key:"cda2e8886a4c776fbd3aa09ca89661805cad0247",icon:"hy-icon-caret-left",size:18})),t("span",{key:"1bd235948fea29cc1cf25c812140b087abc4f71f",class:"open-hours__date-change--title"},this.dateTitle),t("button",{key:"d5733be3decaab622a9cbcea7e4178613e22c90d","aria-label":this.nextLabel,class:"icon--arrow-right open-hours__next-date"},t("hy-icon",{key:"39b8ade2704b0b97ab25daee7f6795bbfff5d806",icon:"hy-icon-caret-right",size:18}))),t("div",{key:"0acd8e75614bc0c715d05a336612baf4feb549a1",class:"open-hours__content__top"},t("span",{key:"d6706b18af8b69dd659fab521948448ff4088818",class:s},this.listLabel),t("span",{key:"bae5faca109caeb73a64c471454f74a11fdb1dce",class:r},this.buildingLabel),this.customerServiceLabel&&t("span",{key:"05665bd69d13624bc899c2bda8788e10b19348a5",class:s},this.customerServiceLabel)),t("div",{key:"8409743f535e461ea79ac53d58bcdbfe92567bcd",class:"open-hours__content"},t("slot",{key:"d22774dc5cce96a24e79697bb8a787f0cf0be41f"})),this.customLink&&t("div",{key:"e77e28c2bb4a7420a8af63d601b90d868d1dad74",class:"open-hours__links"},t("hy-cta-link",{key:"a317216c011ea8c326482f737ed7eca6bfefe604","full-width":!0,"link-content":this.customLinkTitle,"sc-label":this.customLinkTitle,url:this.customLink,variant:o.linkList}))),t("hy-box",{key:"623243b1ae1181a7d8add2a6a7f567158132cbac",mb:"1.75, 1.75, 2, 2.5"}))}};s.style="*{-webkit-box-sizing:border-box;box-sizing:border-box}:host{display:block}.hy-open-hours--container{font-family:var(--main-font-family);max-width:50rem;overflow:hidden}.hy-open-hours--container--exceptional{max-width:100%}.open-hours__title{text-transform:none;margin-bottom:0.75rem}.open-hours__date-change{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--grayscale-background-box);color:var(--brand-main);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.open-hours__date-change--title{font-size:1.25rem;line-height:24px;font-weight:700;color:var(--grayscale-black);font-family:var(--main-font-family);letter-spacing:-0.5px;text-align:center;text-transform:none}.open-hours__date-change .open-hours__prev-date,.open-hours__date-change .open-hours__next-date{background:none;border:0;color:var(--brand-main);display:-webkit-box;display:-ms-flexbox;display:flex;height:44px;outline:5px solid var(--grayscale-white);position:relative;width:44px}.open-hours__date-change .open-hours__prev-date:hover,.open-hours__date-change .open-hours__next-date:hover{background-color:var(--hover-gray);color:var(--brand-main-active);cursor:pointer}.open-hours__date-change .open-hours__prev-date:focus,.open-hours__date-change .open-hours__next-date:focus{background-color:var(--hover-gray);color:var(--brand-main-active)}.open-hours__date-change .open-hours__prev-date:disabled,.open-hours__date-change .open-hours__next-date:disabled{cursor:none}.open-hours__date-change .open-hours__prev-date hy-icon,.open-hours__date-change .open-hours__next-date hy-icon{color:var(--link-blue);left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.open-hours__date-change .open-hours__prev-date svg,.open-hours__date-change .open-hours__next-date svg{fill:currentColor;height:20px;width:20px}.open-hours__date-change .open-hours__prev-date{border-right:1px solid var(--link-blue)}.open-hours__date-change .open-hours__next-date{border-left:1px solid var(--link-blue)}.open-hours__content__top{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;font-size:0.9rem;font-weight:700;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0.5rem 0}.open-hours__content__top-label{margin:0.5rem 0 0.5rem 0;text-align:left;width:33.3333333333vw;word-break:break-word}.open-hours__content__top-label:first-child(){margin-right:1rem}.open-hours__content__top-label.luomus{width:50vw}.open-hours__content__top-label.building.luomus{text-align:center}.open-hours__content{position:relative}.open-hours__content.open-hours__loading:after{-webkit-animation-duration:1s;animation-duration:1s;font-size:3.2rem;position:absolute;left:45%;top:35%;z-index:2}.open-hours__content.slide-left{-webkit-animation:slide-left 0.2s ease-in-out both;animation:slide-left 0.2s ease-in-out both}.open-hours__content.slide-left-reverse{-webkit-animation:slide-left-reverse 0.2s ease-in-out reverse both;animation:slide-left-reverse 0.2s ease-in-out reverse both}.open-hours__content.slide-right{-webkit-animation:slide-right 0.2s ease-in-out both;animation:slide-right 0.2s ease-in-out both}.open-hours__content.slide-right-reverse{-webkit-animation:slide-right-reverse 0.2s ease-in-out reverse both;animation:slide-right-reverse 0.2s ease-in-out reverse both}.open-hours__links{margin:1.5rem 0 1rem 0}.open-hours__links .open-hours__link .hy-cta-link{width:100% !important;-webkit-box-pack:start !important;-ms-flex-pack:start !important;justify-content:flex-start !important}.open-hours__links .open-hours__link .hy-cta-link .text{width:100% !important}@-webkit-keyframes slide-right{0%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}100%{-webkit-transform:translateX(200px);transform:translateX(200px);opacity:0}}@keyframes slide-right{0%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}100%{-webkit-transform:translateX(200px);transform:translateX(200px);opacity:0}}@-webkit-keyframes slide-right-reverse{0%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}100%{-webkit-transform:translateX(200px);transform:translateX(200px);opacity:0}}@keyframes slide-right-reverse{0%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}100%{-webkit-transform:translateX(200px);transform:translateX(200px);opacity:0}}@-webkit-keyframes slide-left{0%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}100%{-webkit-transform:translateX(-200px);transform:translateX(-200px);opacity:0}}@keyframes slide-left{0%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}100%{-webkit-transform:translateX(-200px);transform:translateX(-200px);opacity:0}}@-webkit-keyframes slide-left-reverse{0%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}100%{-webkit-transform:translateX(-200px);transform:translateX(-200px);opacity:0}}@keyframes slide-left-reverse{0%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}100%{-webkit-transform:translateX(-200px);transform:translateX(-200px);opacity:0}}";const r=class{constructor(t){e(this,t),this.multiple=!1,this.selfServiceLabel=null,this.venueType="libraries",this.dataItems=void 0}dataItemsWatcher(e){this._dataItems="string"==typeof e?JSON.parse(e):e}componentWillLoad(){this.dataItemsWatcher(this.dataItems)}render(){return t(a,{key:"00885a2c042415671c4679d9cd14701992f5ac0b"},this._dataItems.map((e=>{if(!e.service)return;const a=["open-hours__list-item",e.today?"open-hours__list-item--today":""].join(" ");return t("div",{class:a},t("span",{class:"open-hours__list-item--office"},e.today?e.today:e.dateLibrary),t("span",{class:"open-hours__list-item--hours"},e.building),t("span",{class:"open-hours__list-item--service"},e.service))})),this.selfServiceLabel&&t("div",{key:"2921d7bc78f58a45e10bfb2ce1e44c9fdbf56357",class:"open-hours__content__top"},t("span",{key:"4ec1c520d1731538ec6332fb26fe7abb9a23e7a3",class:"open-hours__content__top-label"},this.selfServiceLabel)),this._dataItems.map((e=>{if(e.service)return;const a=["open-hours__list-item",e.today?"open-hours__list-item--today":""].join(" "),o=["open-hours__list-item--hours",this.venueType].join(" "),s=["open-hours__list-item--office",this.venueType].join(" ");return t("div",{class:a},t("span",{class:s},e.today?e.today:e.dateLibrary),t("span",{class:o},e.building),"luomus"!==this.venueType&&t("span",{class:"open-hours__list-item--service"},"-"))})))}static get watchers(){return{dataItems:["dataItemsWatcher"]}}};r.style="*{-webkit-box-sizing:border-box;box-sizing:border-box}:host{display:block}.open-hours__list-item{border-top:1px solid var(--grayscale-medium);color:var(--grayscale-dark-text);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;font-size:0.875rem;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0.5rem 0;font-family:var(--main-font-family);text-align:start}.open-hours__list-item--today{background-color:var(--grayscale-light)}.open-hours__list-item--today span:first-child{margin-left:4px;padding-left:4px;margin-right:-8px;font-weight:bold;border-left:2px solid var(--grayscale-black)}.open-hours__list-item>span:not(.luomus){text-align:left;width:33.3333333333vw}.open-hours__list-item>span.luomus{width:50vw}.open-hours__list-item--date{margin-right:1rem}.open-hours__list-item--hours{margin-right:0.2rem}.open-hours__list-item--hours.luomus{text-align:center}";export{s as hy_opening_hours,r as hy_opening_hours_content}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcenteratunihelsinki/huds-lib",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Helsinki University Design System library",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"license": "MIT",
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@stencil/core": "^4.21.0",
|
|
54
|
-
"@uh-design-system/component-library": "^1.0.
|
|
54
|
+
"@uh-design-system/component-library": "^1.0.1",
|
|
55
55
|
"autoprefixer": "^10.3.1",
|
|
56
56
|
"breakpoint-sass": "^3.0.0",
|
|
57
57
|
"concurrently": "^9.0.0",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"pre-commit": "pretty-quick --staged"
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "a9388da59529844ae0c116d89f2aa58d3d535381"
|
|
76
76
|
}
|