@itcenteratunihelsinki/huds-lib 0.8.36 → 0.8.38

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.
@@ -1 +1 @@
1
- import{r as e,h as t,g as i}from"./p-f8697bf9.js";import{g as r}from"./p-d9dc337b.js";let n=null,o=null,s=class{constructor(t){e(this,t),this.styleGrid=!1,this.showMore=!1,this.scrollLeftLabel="Scroll list to left",this.scrollRightLabel="Scroll list to right",this.scrollable=!0}componentDidLoad(){const e=this.el,t=document.querySelector(".hy-events"),i=e.querySelector(".hy-events__scroll-left"),r=e.querySelector(".hy-events__scroll-right");this.styleGrid&&(t.addEventListener("scroll",(()=>{n=setTimeout((()=>{window.clearTimeout(n)}),250)}),!1),i.addEventListener("click",(e=>{e.preventDefault(),i.classList.add("is-disabled"),t.scrollBy({top:0,left:-304,behavior:"smooth"}),o=window.setTimeout((()=>{window.clearTimeout(o),i.classList.remove("is-disabled")}),250)})),r.addEventListener("click",(e=>{e.preventDefault(),r.classList.add("is-disabled"),t.scrollBy({top:0,left:304,behavior:"smooth"}),o=window.setTimeout((()=>{window.clearTimeout(o),r.classList.remove("is-disabled")}),250)})))}watchUrlHandler(e,t){t!==e&&(this.viewAllUrl=e)}checkScrollHidden(e,t,i){const r=e.querySelector(".hy-events__content");0===e.scrollLeft?t.classList.add("is-hidden"):t.classList.remove("is-hidden"),e.scrollLeft+e.clientWidth>=r.scrollWidth-1?i.classList.add("is-hidden"):i.classList.remove("is-hidden")}render(){const e=["hy-events",this.styleGrid?"hy-events--grid":""].join(" "),i=["hy-events__footer",this.styleGrid?"hy-events__footer--grid":""].join(" ");return t("div",{class:"hy-events--wrapper"},t("div",{class:e},t("slot",null)),t("div",{class:i},this.scrollable&&this.styleGrid&&t("div",{class:"hy-events__scroll-buttons"},t("button",{type:"button",class:"hy-events__scroll-left","aria-label":this.scrollLeftLabel},t("hy-icon",{icon:"hy-icon-caret-left",size:16})),t("button",{type:"button",class:"hy-events__scroll-right","aria-label":this.scrollRightLabel},t("hy-icon",{icon:"hy-icon-caret-right",size:16}))),this.showMore&&this.viewAllLabel&&this.viewAllUrl&&t("hy-cta-link",{"link-content":this.viewAllLabel,"sc-label":this.viewAllLabel,url:this.viewAllUrl,variant:r.linkList})))}get el(){return i(this)}static get watchers(){return{viewAllUrl:["watchUrlHandler"]}}};s.style=":root{--brand-main:#0e688b;--brand-main-soft:#b1e7ff;--brand-main-bright:#48c5f8;--brand-main-light:#107eab;--brand-main-active:#005379;--brand-main-dark:#003146;--brand-main-nearly-black:#000222;--link-blue:#0479a4;--link-disabled:#767676;--grayscale-white:#fff;--grayscale-slightly-gray:#fefefe;--grayscale-light:#f8f8f8;--grayscale-medium:#d2d2d2;--grayscale-background-box:#f5f5f5;--grayscale-tabs-border:#e6e6e6;--grayscale-background-arrow:#dfdfdf;--grayscale-medium-dark:#979797;--grayscale-dark:#555555;--grayscale-dark-text:#222222;--grayscale-black:#000000;--additional-red-light:#e5053a;--additional-red-dark:#a31621;--additional-purple-light:#420039;--additional-yellow-light:#f9a21a;--additional-yellow:#c47f1b;--additional-skyblue:#48c5f8;--additional-orange:#d14600;--additional-green-light:#96ba3c;--additional-green-dark:#006400;--hover-gray:#eaeaea}*{-webkit-box-sizing:border-box;box-sizing:border-box}:root{--gutter-mobile:16px;--gutter-narrow:24px;--gutter-medium:24px;--gutter-wide:24px;--gutter-extrawide:32px}:root{--breakpoint-extrawide:75.0625rem;--breakpoint-max-width:75.0625rem;--breakpoint-medium:48rem;--breakpoint-narrow:30rem;--breakpoint-wide:60rem}hy-events.no-events .hy-events__no-result-container{font-family:var(--main-font-family)}hy-events.no-events .hy-events--wrapper .hy-events--grid{padding-bottom:0}hy-events.no-events .hy-events__footer{display:none}.hy-events--wrapper .hy-events{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.hy-events--wrapper .hy-events--grid{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:1.5rem;overflow-x:hidden;white-space:nowrap;scrollbar-width:none}@media (min-width: 48rem){.hy-events--wrapper .hy-events--grid{padding-bottom:14rem}}.hy-events--wrapper .hy-events--grid .hy-events__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;-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}@media (min-width: 48rem){.hy-events--wrapper .hy-events--grid .hy-events__content{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}}.hy-events--wrapper .hy-events__footer{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:2rem}.hy-events--wrapper .hy-events__footer--grid{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;margin-top:1.5rem}@media (min-width: 48rem){.hy-events--wrapper .hy-events__footer--grid{margin-top:-9.5rem}}.hy-events--wrapper .hy-events__scroll-buttons{display:none;margin-top:2rem}@media (min-width: 48rem){.hy-events--wrapper .hy-events__scroll-buttons{display:-webkit-box;display:-ms-flexbox;display:flex}}.hy-events--wrapper .hy-events__scroll-buttons button{border:none;background:none;padding:0.5rem}.hy-events--wrapper .hy-events__scroll-buttons button:hover{cursor:pointer}.hy-events--wrapper .hy-events__scroll-buttons button:hover svg{scale:1.1}.hy-events--wrapper .hy-events__scroll-buttons button.is-hidden{display:none}.hy-events--wrapper .hy-events__scroll-buttons button.is-disabled{pointer-events:none}.hy-events--wrapper .hy-events__scroll-buttons button.is-disabled svg{fill:var(--link-disabled)}";export{s as hy_events}
1
+ import{r as e,h as t,g as i}from"./p-f8697bf9.js";import{g as r}from"./p-0ea3ec9a.js";let n=null,o=null,s=class{constructor(t){e(this,t),this.styleGrid=!1,this.showMore=!1,this.scrollLeftLabel="Scroll list to left",this.scrollRightLabel="Scroll list to right",this.scrollable=!0}componentDidLoad(){const e=this.el,t=document.querySelector(".hy-events"),i=e.querySelector(".hy-events__scroll-left"),r=e.querySelector(".hy-events__scroll-right");this.styleGrid&&(t.addEventListener("scroll",(()=>{n=setTimeout((()=>{window.clearTimeout(n)}),250)}),!1),i.addEventListener("click",(e=>{e.preventDefault(),i.classList.add("is-disabled"),t.scrollBy({top:0,left:-304,behavior:"smooth"}),o=window.setTimeout((()=>{window.clearTimeout(o),i.classList.remove("is-disabled")}),250)})),r.addEventListener("click",(e=>{e.preventDefault(),r.classList.add("is-disabled"),t.scrollBy({top:0,left:304,behavior:"smooth"}),o=window.setTimeout((()=>{window.clearTimeout(o),r.classList.remove("is-disabled")}),250)})))}watchUrlHandler(e,t){t!==e&&(this.viewAllUrl=e)}checkScrollHidden(e,t,i){const r=e.querySelector(".hy-events__content");0===e.scrollLeft?t.classList.add("is-hidden"):t.classList.remove("is-hidden"),e.scrollLeft+e.clientWidth>=r.scrollWidth-1?i.classList.add("is-hidden"):i.classList.remove("is-hidden")}render(){const e=["hy-events",this.styleGrid?"hy-events--grid":""].join(" "),i=["hy-events__footer",this.styleGrid?"hy-events__footer--grid":""].join(" ");return t("div",{class:"hy-events--wrapper"},t("div",{class:e},t("slot",null)),t("div",{class:i},this.scrollable&&this.styleGrid&&t("div",{class:"hy-events__scroll-buttons"},t("button",{type:"button",class:"hy-events__scroll-left","aria-label":this.scrollLeftLabel},t("hy-icon",{icon:"hy-icon-caret-left",size:16})),t("button",{type:"button",class:"hy-events__scroll-right","aria-label":this.scrollRightLabel},t("hy-icon",{icon:"hy-icon-caret-right",size:16}))),this.showMore&&this.viewAllLabel&&this.viewAllUrl&&t("hy-cta-link",{"link-content":this.viewAllLabel,"sc-label":this.viewAllLabel,url:this.viewAllUrl,variant:r.linkList})))}get el(){return i(this)}static get watchers(){return{viewAllUrl:["watchUrlHandler"]}}};s.style=":root{--brand-main:#0e688b;--brand-main-soft:#b1e7ff;--brand-main-bright:#48c5f8;--brand-main-light:#107eab;--brand-main-active:#005379;--brand-main-dark:#003146;--brand-main-nearly-black:#000222;--link-blue:#0479a4;--link-disabled:#767676;--grayscale-white:#fff;--grayscale-slightly-gray:#fefefe;--grayscale-light:#f8f8f8;--grayscale-medium:#d2d2d2;--grayscale-background-box:#f5f5f5;--grayscale-tabs-border:#e6e6e6;--grayscale-background-arrow:#dfdfdf;--grayscale-medium-dark:#979797;--grayscale-dark:#555555;--grayscale-dark-text:#222222;--grayscale-black:#000000;--additional-red-light:#e5053a;--additional-red-dark:#a31621;--additional-purple-light:#420039;--additional-yellow-light:#f9a21a;--additional-yellow:#c47f1b;--additional-skyblue:#48c5f8;--additional-orange:#d14600;--additional-green-light:#96ba3c;--additional-green-dark:#006400;--hover-gray:#eaeaea}*{-webkit-box-sizing:border-box;box-sizing:border-box}:root{--gutter-mobile:16px;--gutter-narrow:24px;--gutter-medium:24px;--gutter-wide:24px;--gutter-extrawide:32px}:root{--breakpoint-extrawide:75.0625rem;--breakpoint-max-width:75.0625rem;--breakpoint-medium:48rem;--breakpoint-narrow:30rem;--breakpoint-wide:60rem}hy-events.no-events .hy-events__no-result-container{font-family:var(--main-font-family)}hy-events.no-events .hy-events--wrapper .hy-events--grid{padding-bottom:0}hy-events.no-events .hy-events__footer{display:none}.hy-events--wrapper .hy-events{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.hy-events--wrapper .hy-events--grid{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:1.5rem;overflow-x:hidden;white-space:nowrap;scrollbar-width:none}@media (min-width: 48rem){.hy-events--wrapper .hy-events--grid{padding-bottom:14rem}}.hy-events--wrapper .hy-events--grid .hy-events__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;-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}@media (min-width: 48rem){.hy-events--wrapper .hy-events--grid .hy-events__content{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}}.hy-events--wrapper .hy-events__footer{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:2rem}.hy-events--wrapper .hy-events__footer--grid{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;margin-top:1.5rem}@media (min-width: 48rem){.hy-events--wrapper .hy-events__footer--grid{margin-top:-9.5rem}}.hy-events--wrapper .hy-events__scroll-buttons{display:none;margin-top:2rem}@media (min-width: 48rem){.hy-events--wrapper .hy-events__scroll-buttons{display:-webkit-box;display:-ms-flexbox;display:flex}}.hy-events--wrapper .hy-events__scroll-buttons button{border:none;background:none;padding:0.5rem}.hy-events--wrapper .hy-events__scroll-buttons button:hover{cursor:pointer}.hy-events--wrapper .hy-events__scroll-buttons button:hover svg{scale:1.1}.hy-events--wrapper .hy-events__scroll-buttons button.is-hidden{display:none}.hy-events--wrapper .hy-events__scroll-buttons button.is-disabled{pointer-events:none}.hy-events--wrapper .hy-events__scroll-buttons button.is-disabled svg{fill:var(--link-disabled)}";export{s as hy_events}
@@ -189,6 +189,7 @@ export declare enum HeroSizeVariant {
189
189
  }
190
190
  export declare enum HeroTypeVariant {
191
191
  landing = "landing",
192
+ group_landing = "group_landing",
192
193
  minor_landing = "minor_landing",
193
194
  front_page = "front_page"
194
195
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcenteratunihelsinki/huds-lib",
3
- "version": "0.8.36",
3
+ "version": "0.8.38",
4
4
  "description": "Helsinki University Design System library",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",