@itcenteratunihelsinki/huds-lib 0.8.68 → 0.8.70

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 (76) hide show
  1. package/components/hy-dropdown.js +147 -46
  2. package/components/hy-dropdown.js.map +1 -1
  3. package/components/hy-footer-base.js +10 -4
  4. package/components/hy-footer-base.js.map +1 -1
  5. package/components/hy-footer-link-item2.js +1 -1
  6. package/components/hy-footer-link-item2.js.map +1 -1
  7. package/components/hy-hero-carousel.js +1 -1
  8. package/components/hy-hero-carousel.js.map +1 -1
  9. package/components/hy-video.js +1 -1
  10. package/components/hy-video.js.map +1 -1
  11. package/dist/cjs/huds-lib.cjs.js +1 -1
  12. package/dist/cjs/hy-breadcrumbs_15.cjs.entry.js +10 -5
  13. package/dist/cjs/hy-breadcrumbs_15.cjs.entry.js.map +1 -1
  14. package/dist/cjs/hy-dropdown.cjs.entry.js +226 -0
  15. package/dist/cjs/hy-dropdown.cjs.entry.js.map +1 -0
  16. package/dist/cjs/hy-hero-carousel.cjs.entry.js +1 -1
  17. package/dist/cjs/hy-hero-carousel.cjs.entry.js.map +1 -1
  18. package/dist/cjs/hy-video.cjs.entry.js +1 -1
  19. package/dist/cjs/hy-video.cjs.entry.js.map +1 -1
  20. package/dist/cjs/loader.cjs.js +1 -1
  21. package/dist/collection/collection-manifest.json +5 -9
  22. package/dist/collection/components/footer/hy-footer-base/hy-footer-base.css +152 -66
  23. package/dist/collection/components/footer/hy-footer-base/hy-footer-base.js +30 -3
  24. package/dist/collection/components/footer/hy-footer-base/hy-footer-base.js.map +1 -1
  25. package/dist/collection/components/footer/hy-footer-link-item/hy-footer-link-item.css +27 -9
  26. package/dist/collection/components/hy-dropdown/hy-dropdown.css +48 -33
  27. package/dist/collection/components/hy-dropdown/hy-dropdown.js +232 -35
  28. package/dist/collection/components/hy-dropdown/hy-dropdown.js.map +1 -1
  29. package/dist/collection/components/hy-hero-carousel/hy-hero-carousel.css +13 -3
  30. package/dist/collection/components/hy-video/hy-video.css +1 -14
  31. package/dist/esm/huds-lib.js +1 -1
  32. package/dist/esm/hy-breadcrumbs_15.entry.js +10 -5
  33. package/dist/esm/hy-breadcrumbs_15.entry.js.map +1 -1
  34. package/dist/esm/hy-dropdown.entry.js +222 -0
  35. package/dist/esm/hy-dropdown.entry.js.map +1 -0
  36. package/dist/esm/hy-hero-carousel.entry.js +1 -1
  37. package/dist/esm/hy-hero-carousel.entry.js.map +1 -1
  38. package/dist/esm/hy-video.entry.js +1 -1
  39. package/dist/esm/hy-video.entry.js.map +1 -1
  40. package/dist/esm/loader.js +1 -1
  41. package/dist/huds-lib/huds-lib.esm.js +1 -1
  42. package/dist/huds-lib/huds-lib.esm.js.map +1 -1
  43. package/dist/huds-lib/hy-breadcrumbs_15.entry.js +1 -1
  44. package/dist/huds-lib/hy-breadcrumbs_15.entry.js.map +1 -1
  45. package/dist/huds-lib/hy-dropdown.entry.js +2 -0
  46. package/dist/huds-lib/hy-dropdown.entry.js.map +1 -0
  47. package/dist/huds-lib/hy-hero-carousel.entry.js +1 -1
  48. package/dist/huds-lib/hy-hero-carousel.entry.js.map +1 -1
  49. package/dist/huds-lib/hy-video.entry.js +1 -1
  50. package/dist/huds-lib/hy-video.entry.js.map +1 -1
  51. package/dist/types/components/footer/hy-footer-base/hy-footer-base.d.ts +10 -0
  52. package/dist/types/components/hy-dropdown/hy-dropdown.d.ts +17 -3
  53. package/dist/types/components.d.ts +20 -38
  54. package/package.json +2 -2
  55. package/components/hy-dropdown-panel-item.d.ts +0 -11
  56. package/components/hy-dropdown-panel-item.js +0 -8
  57. package/components/hy-dropdown-panel-item.js.map +0 -1
  58. package/components/hy-dropdown-panel.d.ts +0 -11
  59. package/components/hy-dropdown-panel.js +0 -8
  60. package/components/hy-dropdown-panel.js.map +0 -1
  61. package/components/hy-dropdown.panel.item.js +0 -43
  62. package/components/hy-dropdown.panel.item.js.map +0 -1
  63. package/components/hy-dropdown.panel.js +0 -31
  64. package/components/hy-dropdown.panel.js.map +0 -1
  65. package/dist/cjs/hy-dropdown_3.cjs.entry.js +0 -141
  66. package/dist/cjs/hy-dropdown_3.cjs.entry.js.map +0 -1
  67. package/dist/collection/components/hy-dropdown/hy-dropdown.panel.item.js +0 -87
  68. package/dist/collection/components/hy-dropdown/hy-dropdown.panel.item.js.map +0 -1
  69. package/dist/collection/components/hy-dropdown/hy-dropdown.panel.js +0 -32
  70. package/dist/collection/components/hy-dropdown/hy-dropdown.panel.js.map +0 -1
  71. package/dist/esm/hy-dropdown_3.entry.js +0 -135
  72. package/dist/esm/hy-dropdown_3.entry.js.map +0 -1
  73. package/dist/huds-lib/hy-dropdown_3.entry.js +0 -2
  74. package/dist/huds-lib/hy-dropdown_3.entry.js.map +0 -1
  75. package/dist/types/components/hy-dropdown/hy-dropdown.panel.d.ts +0 -4
  76. package/dist/types/components/hy-dropdown/hy-dropdown.panel.item.d.ts +0 -7
@@ -1,2 +1,2 @@
1
- import{r as i,h as e,g as t}from"./index-f84f2a7d.js";import{f as a}from"./utils-2819fd7e.js";const o=':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}:host{display:block}a.hy-video{text-decoration:none}.hy-video__video-container{display:inline-block;margin-bottom:22px;position:relative;width:100%}.hy-video__video-container iframe{border:0;height:100%;overflow:hidden;width:100%}@supports (aspect-ratio: 16/9){.hy-video__video-container iframe{aspect-ratio:16/9;height:auto}}.hy-video__video-container .hy-video__preview-image{height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;top:0;width:100%}.hy-video__video-container .hy-video__play{background-color:var(--grayscale-white);left:50%;position:absolute;top:50%;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}.hy-video__video-container .hy-video__play button{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:transparent;border:none;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding:24px}@media (min-width: 30rem){.hy-video__video-container .hy-video__play button{padding:36px}}.hy-video__video-container .hy-video__play button:hover{cursor:pointer}.hy-video__video-container .hy-video__play button .hy-video__button-label{font-size:0.9375rem;line-height:18px;color:var(--link-blue);font-family:var(--main-font-family);font-weight:bold;letter-spacing:-0.1px;text-align:center;text-transform:uppercase}@media (min-width: 30rem){.hy-video__video-container .hy-video__play button .hy-video__button-label{font-size:1.0625rem;line-height:20px;letter-spacing:-0.14px}}@media (min-width: 75.0625rem){.hy-video__video-container .hy-video__play button .hy-video__button-label{font-size:1.0625rem;line-height:20px;letter-spacing:-0.16px}}.hy-video__video-container .hy-video__play button svg{fill:var(--link-blue);height:44px;width:44px}@media (min-width: 60rem){.hy-video__video-container .hy-video__play button svg{height:80px;width:80px}}.hy-video__video-container .hy-video__play__simple{background-color:rgba(0, 0, 0, 0.2);position:absolute;width:100%;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.hy-video__video-container .hy-video__play__simple:hover{cursor:pointer}.hy-video__video-container .hy-video__play__simple button{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:transparent;border:none;display:-webkit-box;display:-ms-flexbox;display:flex}.hy-video__video-container .hy-video__play__simple button svg{fill:var(--grayscale-white);height:44px;width:44px}@media (min-width: 60rem){.hy-video__video-container .hy-video__play__simple button svg{height:80px;width:80px}}.hy-video__video-container>*:not(.hy-video__label,.hy-video__play,.hy-video__play__simple){bottom:0;left:0;position:absolute;right:0;top:0}.hy-video__video-container:after{content:"";display:block;padding-top:56.25%}.hy-video:not(.hy-video--horizontal){display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}@media (min-width: 1601px){.hy-video:not(.hy-video--horizontal):not(.hy-video__default,.hy-video--list){max-width:66%}}.hy-video--list .hy-video__meta__details{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;gap:32px;margin:0}.hy-video--list .hy-video__meta__details--item{margin-right:0;padding-right:0}.hy-video__label{font-size:0.75rem;line-height:14px;display:inline-block;background-color:var(--grayscale-black);color:var(--grayscale-white);font-family:var(--main-font-family);font-weight:bold;letter-spacing:-0.5px;padding:6px 8px;margin:0 0 22px;text-transform:uppercase}.hy-video.hy-video--horizontal{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}@media (min-width: 60rem){.hy-video.hy-video--horizontal{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}}.hy-video.hy-video--horizontal .hy-video__meta{padding-left:0;width:100%}@media (min-width: 60rem){.hy-video.hy-video--horizontal .hy-video__meta{padding-left:2.5%;width:57.24%}}.hy-video__meta__title h2.hy-heading,.hy-video__meta__title h3.hy-heading{border:none;margin:8px 0 12px 0 !important;-ms-hyphens:auto;hyphens:auto;word-break:break-word;padding:0 !important}@media (min-width: 60rem){.hy-video__meta__title h2.hy-heading,.hy-video__meta__title h3.hy-heading{margin:0 0 16px 0 !important}}.hy-video__meta__details{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;margin-bottom:12px}@media (min-width: 60rem){.hy-video__meta__details{margin-bottom:16px}}.hy-video__meta__details--item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-right:44px;min-width:87px;padding-right:46px;place-content:center space-between}.hy-video__meta__description__content{font-size:0.9375rem;line-height:22px;color:var(--grayscale-black);display:block;font-family:var(--main-font-family);letter-spacing:0;width:100%}@media (min-width: 30rem){.hy-video__meta__description__content{font-size:1.0625rem;line-height:26px}}.hy-video__meta__description__more-button{font-size:1rem;line-height:24px;color:var(--brand-main-light);font-family:var(--main-font-family)}.hy-video__meta__description__more-button:hover{cursor:pointer}.hy-video__meta__label{font-size:0.9375rem;line-height:18px;font-weight:700;color:var(--grayscale-black);font-family:var(--main-font-family);margin-bottom:4px}.hy-video__meta__content{font-size:0.9375rem;line-height:22px;color:var(--grayscale-black);font-family:var(--main-font-family);letter-spacing:-0.5px}@media (min-width: 30rem){.hy-video__meta__content{font-size:1.0625rem;line-height:26px;letter-spacing:-0.56px}}';const s=class{constructor(t){i(this,t);this.renderPreviewWithLink=()=>this.linkToVideo?e("a",{title:this.videoTitle,href:this.linkToVideo,class:"hy-video__link-to-video"},e("img",{loading:this.disableLazy?"eager":"lazy",class:"hy-video__preview-image",src:this.previewImageUrl,alt:this.videoTitle})):e("img",{loading:this.disableLazy?"eager":"lazy",class:"hy-video__preview-image",src:this.previewImageUrl,alt:this.videoTitle});this.renderPlayButton=()=>{if(this.simplePlayButton){return e("span",{class:"hy-video__play__simple"},e("button",{type:"button"},e("hy-icon",{icon:"hy-icon-video",class:"hy-video__play-icon",size:20})))}else{return e("span",{class:"hy-video__play"},e("button",{type:"button"},e("hy-icon",{icon:"hy-icon-video",class:"hy-video__play-icon",size:20}),e("span",{class:"hy-video__button-label"},this.playButtonLabel)))}};this.truncate=(i,e)=>i.length>e?i.substr(0,e-1)+"...":i;this.videoTitle=undefined;this.videoDescription=undefined;this.contextLabel=undefined;this.contextLabelVisible=false;this.previewImageUrl=undefined;this.linkToVideo=undefined;this.playButtonLabel=undefined;this.playButtonVisible=false;this.seriesLabel="In this series";this.seriesCount=null;this.views=undefined;this.viewsLabel=undefined;this.duration=undefined;this.durationLabel=undefined;this.dateAdded=undefined;this.dateAddedLabel=undefined;this.horizontal=false;this.disableLazy=false;this.headerstyle="default";this.showMoreLabel="Show more";this.showLessLabel="Show less";this.simplePlayButton=false;this.styleList=false;this.descCollapsed=false}componentDidLoad(){let i=this.el.closest(".hy-main");if(i){if(!i.classList.contains("with-sidebar")){this.headerstyle="large"}}if(this.videoDescription&&this.videoDescription.match(/\S/g).length>255){this.descCollapsed=true}}render(){const i=["hy-video",this.horizontal?"hy-video--horizontal":"",!this.styleList?`hy-video__${this.headerstyle}`:"",this.styleList?"hy-video--list":""].join(" ");const t=255;const o=this.videoDescription?this.videoDescription.match(/\S/g).length:0;if(this.linkToVideo&&this.styleList){return[e("a",{href:this.linkToVideo,class:i},this.videoTitle&&!this.horizontal&&!this.styleList&&e("hy-heading",{class:"hy-video__meta__title",heading:a.h2},this.videoTitle),e("div",{class:"hy-video__video-container"},this.previewImageUrl?e("div",null,this.renderPreviewWithLink(),e("slot",{name:"video"})):e("slot",{name:"video"}),this.playButtonVisible&&this.renderPlayButton()),e("div",{class:"hy-video__meta"},this.videoTitle&&this.horizontal||this.styleList&&e("hy-heading",{class:"hy-video__meta__title",heading:a.h3},this.videoTitle),this.contextLabelVisible&&e("span",{class:"hy-video__label"},this.contextLabel),(this.duration||this.views||this.dateAdded||this.seriesCount)&&e("div",{class:"hy-video__meta__details"},this.duration&&e("div",{class:"hy-video__meta__details--item"},e("span",{class:"hy-video__meta__label"},this.durationLabel),e("span",{class:"hy-video__meta__content"},this.duration)),this.views&&e("div",{class:"hy-video__meta__details--item"},e("span",{class:"hy-video__meta__label"},this.viewsLabel),e("span",{class:"hy-video__meta__content"},this.views)),this.dateAdded&&e("div",{class:"hy-video__meta__details--item"},e("span",{class:"hy-video__meta__label"},this.dateAddedLabel),e("span",{class:"hy-video__meta__content"},this.dateAdded)),!this.views&&this.seriesCount&&e("div",{class:"hy-video__meta__details--item"},e("span",{class:"hy-video__meta__label"},this.seriesLabel),e("span",{class:"hy-video__meta__content"},this.seriesCount))),this.videoDescription&&e("div",{class:"hy-video__meta__description","aria-expanded":this.descCollapsed?"false":"true"},e("div",{class:"hy-video__meta__description__content"},this.descCollapsed?this.truncate(this.videoDescription,255):this.videoDescription),o>t&&e("span",{class:"hy-video__meta__description__more-button",role:"button",tabindex:"0","aria-expanded":this.descCollapsed?"false":"true",onClick:()=>this.descCollapsed=!this.descCollapsed,onKeyDown:i=>{if(i.key!=" ")return;i.preventDefault();this.descCollapsed=!this.descCollapsed}},this.descCollapsed?this.showMoreLabel:this.showLessLabel))))]}else{return[e("div",{class:i},this.videoTitle&&!this.horizontal&&!this.styleList&&e("hy-heading",{class:"hy-video__meta__title",heading:a.h2},this.videoTitle),e("div",{class:"hy-video__video-container"},this.previewImageUrl?e("div",null,this.renderPreviewWithLink(),e("slot",{name:"video"})):e("slot",{name:"video"}),this.playButtonVisible&&this.renderPlayButton()),e("div",{class:"hy-video__meta"},this.videoTitle&&this.horizontal||this.styleList&&e("hy-heading",{class:"hy-video__meta__title",heading:a.h2},this.videoTitle),this.contextLabelVisible&&e("span",{class:"hy-video__label"},this.contextLabel),(this.duration||this.views||this.dateAdded)&&e("div",{class:"hy-video__meta__details"},this.duration&&e("div",{class:"hy-video__meta__details--item"},e("span",{class:"hy-video__meta__label"},this.durationLabel),e("span",{class:"hy-video__meta__content"},this.duration)),this.views&&e("div",{class:"hy-video__meta__details--item"},e("span",{class:"hy-video__meta__label"},this.viewsLabel),e("span",{class:"hy-video__meta__content"},this.views)),this.dateAdded&&e("div",{class:"hy-video__meta__details--item"},e("span",{class:"hy-video__meta__label"},this.dateAddedLabel),e("span",{class:"hy-video__meta__content"},this.dateAdded))),this.videoDescription&&e("div",{class:"hy-video__meta__description","aria-expanded":this.descCollapsed?"false":"true"},e("div",{class:"hy-video__meta__description__content"},this.descCollapsed?this.truncate(this.videoDescription,255):this.videoDescription),o>t&&e("span",{class:"hy-video__meta__description__more-button",role:"button",tabindex:"0","aria-expanded":this.descCollapsed?"false":"true",onClick:()=>this.descCollapsed=!this.descCollapsed,onKeyDown:i=>{if(i.key!=" ")return;i.preventDefault();this.descCollapsed=!this.descCollapsed}},this.descCollapsed?this.showMoreLabel:this.showLessLabel)))),e("hy-box",{mb:"1.75, 1.75, 2, 2.5"})]}}get el(){return t(this)}};s.style=o;export{s as hy_video};
1
+ import{r as i,h as e,g as t}from"./index-f84f2a7d.js";import{f as a}from"./utils-2819fd7e.js";const o=":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}:host{display:block}a.hy-video{text-decoration:none}.hy-video__video-container{aspect-ratio:16/9;display:inline-block;margin-bottom:22px;position:relative;width:100%}.hy-video__video-container iframe{border:0;height:100%;overflow:hidden;width:100%}@supports (aspect-ratio: 16/9){.hy-video__video-container iframe{aspect-ratio:16/9;height:auto}}.hy-video__video-container .hy-video__preview-image{height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;top:0;width:100%}.hy-video__video-container .hy-video__play{background-color:var(--grayscale-white);left:50%;position:absolute;top:50%;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}.hy-video__video-container .hy-video__play button{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:transparent;border:none;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding:24px}@media (min-width: 30rem){.hy-video__video-container .hy-video__play button{padding:36px}}.hy-video__video-container .hy-video__play button:hover{cursor:pointer}.hy-video__video-container .hy-video__play button .hy-video__button-label{font-size:0.9375rem;line-height:18px;color:var(--link-blue);font-family:var(--main-font-family);font-weight:bold;letter-spacing:-0.1px;text-align:center;text-transform:uppercase}@media (min-width: 30rem){.hy-video__video-container .hy-video__play button .hy-video__button-label{font-size:1.0625rem;line-height:20px;letter-spacing:-0.14px}}@media (min-width: 75.0625rem){.hy-video__video-container .hy-video__play button .hy-video__button-label{font-size:1.0625rem;line-height:20px;letter-spacing:-0.16px}}.hy-video__video-container .hy-video__play button svg{fill:var(--link-blue);height:44px;width:44px}@media (min-width: 60rem){.hy-video__video-container .hy-video__play button svg{height:80px;width:80px}}.hy-video__video-container .hy-video__play__simple{background-color:rgba(0, 0, 0, 0.2);position:absolute;width:100%;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.hy-video__video-container .hy-video__play__simple:hover{cursor:pointer}.hy-video__video-container .hy-video__play__simple button{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:transparent;border:none;display:-webkit-box;display:-ms-flexbox;display:flex}.hy-video__video-container .hy-video__play__simple button svg{fill:var(--grayscale-white);height:44px;width:44px}@media (min-width: 60rem){.hy-video__video-container .hy-video__play__simple button svg{height:80px;width:80px}}.hy-video:not(.hy-video--horizontal){display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}@media (min-width: 1601px){.hy-video:not(.hy-video--horizontal):not(.hy-video__default,.hy-video--list){max-width:66%}}.hy-video--list .hy-video__meta__details{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;gap:32px;margin:0}.hy-video--list .hy-video__meta__details--item{margin-right:0;padding-right:0}.hy-video__label{font-size:0.75rem;line-height:14px;display:inline-block;background-color:var(--grayscale-black);color:var(--grayscale-white);font-family:var(--main-font-family);font-weight:bold;letter-spacing:-0.5px;padding:6px 8px;margin:0 0 22px;text-transform:uppercase}.hy-video.hy-video--horizontal{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}@media (min-width: 60rem){.hy-video.hy-video--horizontal{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}}.hy-video.hy-video--horizontal .hy-video__meta{padding-left:0;width:100%}@media (min-width: 60rem){.hy-video.hy-video--horizontal .hy-video__meta{padding-left:2.5%;width:57.24%}}.hy-video__meta__title h2.hy-heading,.hy-video__meta__title h3.hy-heading{border:none;margin:8px 0 12px 0 !important;-ms-hyphens:auto;hyphens:auto;word-break:break-word;padding:0 !important}@media (min-width: 60rem){.hy-video__meta__title h2.hy-heading,.hy-video__meta__title h3.hy-heading{margin:0 0 16px 0 !important}}.hy-video__meta__details{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;margin-bottom:12px}@media (min-width: 60rem){.hy-video__meta__details{margin-bottom:16px}}.hy-video__meta__details--item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-right:44px;min-width:87px;padding-right:46px;place-content:center space-between}.hy-video__meta__description__content{font-size:0.9375rem;line-height:22px;color:var(--grayscale-black);display:block;font-family:var(--main-font-family);letter-spacing:0;width:100%}@media (min-width: 30rem){.hy-video__meta__description__content{font-size:1.0625rem;line-height:26px}}.hy-video__meta__description__more-button{font-size:1rem;line-height:24px;color:var(--brand-main-light);font-family:var(--main-font-family)}.hy-video__meta__description__more-button:hover{cursor:pointer}.hy-video__meta__label{font-size:0.9375rem;line-height:18px;font-weight:700;color:var(--grayscale-black);font-family:var(--main-font-family);margin-bottom:4px}.hy-video__meta__content{font-size:0.9375rem;line-height:22px;color:var(--grayscale-black);font-family:var(--main-font-family);letter-spacing:-0.5px}@media (min-width: 30rem){.hy-video__meta__content{font-size:1.0625rem;line-height:26px;letter-spacing:-0.56px}}";const s=class{constructor(t){i(this,t);this.renderPreviewWithLink=()=>this.linkToVideo?e("a",{title:this.videoTitle,href:this.linkToVideo,class:"hy-video__link-to-video"},e("img",{loading:this.disableLazy?"eager":"lazy",class:"hy-video__preview-image",src:this.previewImageUrl,alt:this.videoTitle})):e("img",{loading:this.disableLazy?"eager":"lazy",class:"hy-video__preview-image",src:this.previewImageUrl,alt:this.videoTitle});this.renderPlayButton=()=>{if(this.simplePlayButton){return e("span",{class:"hy-video__play__simple"},e("button",{type:"button"},e("hy-icon",{icon:"hy-icon-video",class:"hy-video__play-icon",size:20})))}else{return e("span",{class:"hy-video__play"},e("button",{type:"button"},e("hy-icon",{icon:"hy-icon-video",class:"hy-video__play-icon",size:20}),e("span",{class:"hy-video__button-label"},this.playButtonLabel)))}};this.truncate=(i,e)=>i.length>e?i.substr(0,e-1)+"...":i;this.videoTitle=undefined;this.videoDescription=undefined;this.contextLabel=undefined;this.contextLabelVisible=false;this.previewImageUrl=undefined;this.linkToVideo=undefined;this.playButtonLabel=undefined;this.playButtonVisible=false;this.seriesLabel="In this series";this.seriesCount=null;this.views=undefined;this.viewsLabel=undefined;this.duration=undefined;this.durationLabel=undefined;this.dateAdded=undefined;this.dateAddedLabel=undefined;this.horizontal=false;this.disableLazy=false;this.headerstyle="default";this.showMoreLabel="Show more";this.showLessLabel="Show less";this.simplePlayButton=false;this.styleList=false;this.descCollapsed=false}componentDidLoad(){let i=this.el.closest(".hy-main");if(i){if(!i.classList.contains("with-sidebar")){this.headerstyle="large"}}if(this.videoDescription&&this.videoDescription.match(/\S/g).length>255){this.descCollapsed=true}}render(){const i=["hy-video",this.horizontal?"hy-video--horizontal":"",!this.styleList?`hy-video__${this.headerstyle}`:"",this.styleList?"hy-video--list":""].join(" ");const t=255;const o=this.videoDescription?this.videoDescription.match(/\S/g).length:0;if(this.linkToVideo&&this.styleList){return[e("a",{href:this.linkToVideo,class:i},this.videoTitle&&!this.horizontal&&!this.styleList&&e("hy-heading",{class:"hy-video__meta__title",heading:a.h2},this.videoTitle),e("div",{class:"hy-video__video-container"},this.previewImageUrl?e("div",null,this.renderPreviewWithLink(),e("slot",{name:"video"})):e("slot",{name:"video"}),this.playButtonVisible&&this.renderPlayButton()),e("div",{class:"hy-video__meta"},this.videoTitle&&this.horizontal||this.styleList&&e("hy-heading",{class:"hy-video__meta__title",heading:a.h3},this.videoTitle),this.contextLabelVisible&&e("span",{class:"hy-video__label"},this.contextLabel),(this.duration||this.views||this.dateAdded||this.seriesCount)&&e("div",{class:"hy-video__meta__details"},this.duration&&e("div",{class:"hy-video__meta__details--item"},e("span",{class:"hy-video__meta__label"},this.durationLabel),e("span",{class:"hy-video__meta__content"},this.duration)),this.views&&e("div",{class:"hy-video__meta__details--item"},e("span",{class:"hy-video__meta__label"},this.viewsLabel),e("span",{class:"hy-video__meta__content"},this.views)),this.dateAdded&&e("div",{class:"hy-video__meta__details--item"},e("span",{class:"hy-video__meta__label"},this.dateAddedLabel),e("span",{class:"hy-video__meta__content"},this.dateAdded)),!this.views&&this.seriesCount&&e("div",{class:"hy-video__meta__details--item"},e("span",{class:"hy-video__meta__label"},this.seriesLabel),e("span",{class:"hy-video__meta__content"},this.seriesCount))),this.videoDescription&&e("div",{class:"hy-video__meta__description","aria-expanded":this.descCollapsed?"false":"true"},e("div",{class:"hy-video__meta__description__content"},this.descCollapsed?this.truncate(this.videoDescription,255):this.videoDescription),o>t&&e("span",{class:"hy-video__meta__description__more-button",role:"button",tabindex:"0","aria-expanded":this.descCollapsed?"false":"true",onClick:()=>this.descCollapsed=!this.descCollapsed,onKeyDown:i=>{if(i.key!=" ")return;i.preventDefault();this.descCollapsed=!this.descCollapsed}},this.descCollapsed?this.showMoreLabel:this.showLessLabel))))]}else{return[e("div",{class:i},this.videoTitle&&!this.horizontal&&!this.styleList&&e("hy-heading",{class:"hy-video__meta__title",heading:a.h2},this.videoTitle),e("div",{class:"hy-video__video-container"},this.previewImageUrl?e("div",null,this.renderPreviewWithLink(),e("slot",{name:"video"})):e("slot",{name:"video"}),this.playButtonVisible&&this.renderPlayButton()),e("div",{class:"hy-video__meta"},this.videoTitle&&this.horizontal||this.styleList&&e("hy-heading",{class:"hy-video__meta__title",heading:a.h2},this.videoTitle),this.contextLabelVisible&&e("span",{class:"hy-video__label"},this.contextLabel),(this.duration||this.views||this.dateAdded)&&e("div",{class:"hy-video__meta__details"},this.duration&&e("div",{class:"hy-video__meta__details--item"},e("span",{class:"hy-video__meta__label"},this.durationLabel),e("span",{class:"hy-video__meta__content"},this.duration)),this.views&&e("div",{class:"hy-video__meta__details--item"},e("span",{class:"hy-video__meta__label"},this.viewsLabel),e("span",{class:"hy-video__meta__content"},this.views)),this.dateAdded&&e("div",{class:"hy-video__meta__details--item"},e("span",{class:"hy-video__meta__label"},this.dateAddedLabel),e("span",{class:"hy-video__meta__content"},this.dateAdded))),this.videoDescription&&e("div",{class:"hy-video__meta__description","aria-expanded":this.descCollapsed?"false":"true"},e("div",{class:"hy-video__meta__description__content"},this.descCollapsed?this.truncate(this.videoDescription,255):this.videoDescription),o>t&&e("span",{class:"hy-video__meta__description__more-button",role:"button",tabindex:"0","aria-expanded":this.descCollapsed?"false":"true",onClick:()=>this.descCollapsed=!this.descCollapsed,onKeyDown:i=>{if(i.key!=" ")return;i.preventDefault();this.descCollapsed=!this.descCollapsed}},this.descCollapsed?this.showMoreLabel:this.showLessLabel)))),e("hy-box",{mb:"1.75, 1.75, 2, 2.5"})]}}get el(){return t(this)}};s.style=o;export{s as hy_video};
2
2
  //# sourceMappingURL=hy-video.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["hyVideoCss","HyVideo","this","renderPreviewWithLink","linkToVideo","h","title","videoTitle","href","class","loading","disableLazy","src","previewImageUrl","alt","renderPlayButton","simplePlayButton","type","icon","size","playButtonLabel","truncate","str","n","length","substr","componentDidLoad","hyMainDiv","el","closest","classList","contains","headerstyle","videoDescription","match","descCollapsed","render","classAttributes","horizontal","styleList","join","maxChars","charCount","heading","HeadingVarians","h2","name","playButtonVisible","h3","contextLabelVisible","contextLabel","duration","views","dateAdded","seriesCount","durationLabel","viewsLabel","dateAddedLabel","seriesLabel","role","tabindex","onClick","onKeyDown","e","key","preventDefault","showMoreLabel","showLessLabel","mb"],"sources":["./src/components/hy-video/hy-video.scss?tag=hy-video","./src/components/hy-video/hy-video.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\na.hy-video {\n text-decoration: none;\n}\n\n.hy-video__video-container {\n display: inline-block;\n margin-bottom: 22px;\n position: relative;\n width: 100%;\n\n iframe {\n border: 0;\n height: 100%;\n overflow: hidden;\n width: 100%;\n\n @supports (aspect-ratio: 16 / 9) {\n aspect-ratio: 16 / 9;\n height: auto;\n }\n }\n\n .hy-video__preview-image {\n height: 100%;\n left: 0;\n object-fit: cover;\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n .hy-video__play {\n background-color: var(--grayscale-white);\n left: 50%;\n position: absolute;\n top: 50%;\n transform: translateX(-50%) translateY(-50%);\n\n button {\n align-items: center;\n background: transparent;\n border: none;\n display: flex;\n flex-direction: column;\n padding: 24px;\n\n @include breakpoint($narrow) {\n padding: 36px;\n }\n\n &:hover {\n cursor: pointer;\n }\n }\n\n button .hy-video__button-label {\n @include font-size(15px, 18px);\n\n color: var(--link-blue);\n font-family: var(--main-font-family);\n font-weight: bold;\n letter-spacing: -0.1px;\n text-align: center;\n text-transform: uppercase;\n\n @include breakpoint($narrow) {\n @include font-size(17px, 20px);\n\n letter-spacing: -0.14px;\n }\n\n @include breakpoint($extrawide) {\n @include font-size(17px, 20px);\n\n letter-spacing: -0.16px;\n }\n }\n\n button svg {\n fill: var(--link-blue);\n height: 44px;\n width: 44px;\n\n @include breakpoint($wide) {\n height: 80px;\n width: 80px;\n }\n }\n }\n\n .hy-video__play__simple {\n background-color: rgba(#000000, 0.2);\n position: absolute;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &:hover {\n cursor: pointer;\n }\n\n button {\n align-items: center;\n background: transparent;\n border: none;\n display: flex;\n }\n\n button svg {\n fill: var(--grayscale-white);\n height: 44px;\n width: 44px;\n\n @include breakpoint($wide) {\n height: 80px;\n width: 80px;\n }\n }\n }\n\n > *:not(.hy-video__label, .hy-video__play, .hy-video__play__simple) {\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n }\n\n &:after {\n content: \"\";\n display: block;\n // 16:9 ratio\n padding-top: calc(9 / 16) * 100%;\n }\n}\n\n.hy-video:not(.hy-video--horizontal) {\n display: flex;\n flex-direction: column;\n\n &:not(.hy-video__default, .hy-video--list) {\n @include breakpoint($xlarge) {\n max-width: 66%;\n }\n }\n}\n\n.hy-video--list {\n .hy-video__meta__details {\n justify-content: flex-start;\n gap: 32px;\n margin: 0;\n }\n .hy-video__meta__details--item {\n margin-right: 0;\n padding-right: 0;\n }\n}\n\n.hy-video__label {\n // font: h5 small size\n @include font-size(12px, 14px);\n display: inline-block;\n background-color: var(--grayscale-black);\n color: var(--grayscale-white);\n font-family: var(--main-font-family);\n font-weight: bold;\n letter-spacing: -0.5px;\n padding: 6px 8px;\n margin: 0 0 22px;\n text-transform: uppercase;\n}\n\n.hy-video.hy-video--horizontal {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n\n @include breakpoint($wide) {\n flex-direction: row;\n }\n\n .hy-video__meta {\n padding-left: 0;\n width: 100%;\n\n @include breakpoint($wide) {\n padding-left: 2.5%;\n width: 57.24%;\n }\n }\n}\n\n.hy-video__meta__title {\n h2.hy-heading,\n h3.hy-heading {\n border: none;\n margin: 8px 0 12px 0 !important;\n hyphens: auto;\n word-break: break-word;\n padding: 0 !important;\n\n @include breakpoint($wide) {\n margin: 0 0 16px 0 !important;\n }\n }\n}\n\n.hy-video__meta__details {\n display: flex;\n flex-direction: row;\n margin-bottom: 12px;\n\n @include breakpoint($wide) {\n margin-bottom: 16px;\n }\n}\n\n.hy-video__meta__details--item {\n display: flex;\n flex-direction: column;\n margin-right: 44px;\n min-width: 87px;\n padding-right: 46px;\n place-content: center space-between;\n}\n\n.hy-video__meta__description__content {\n @include font-size(15px, 22px);\n\n color: var(--grayscale-black);\n display: block;\n font-family: var(--main-font-family);\n letter-spacing: 0;\n width: 100%;\n\n @include breakpoint($narrow) {\n @include font-size(17px, 26px);\n }\n}\n\n.hy-video__meta__description__more-button {\n @include font-size(16px, 24px);\n color: var(--brand-main-light);\n font-family: var(--main-font-family);\n\n &:hover {\n cursor: pointer;\n }\n}\n\n.hy-video__meta__label {\n @include font-size(15px, 18px);\n @include font-weight($bold);\n color: var(--grayscale-black);\n font-family: var(--main-font-family);\n margin-bottom: 4px;\n}\n\n.hy-video__meta__content {\n @include font-size(15px, 22px);\n\n color: var(--grayscale-black);\n font-family: var(--main-font-family);\n letter-spacing: -0.5px;\n\n @include breakpoint($narrow) {\n @include font-size(17px, 26px);\n\n letter-spacing: -0.56px;\n }\n}\n","import {Component, Prop, h, Element, State} from \"@stencil/core\";\nimport {HeadingVarians} from \"../../utils/utils\";\n\n@Component({\n tag: \"hy-video\",\n styleUrl: \"hy-video.scss\",\n shadow: false,\n})\nexport class HyVideo {\n @Element() el: HTMLElement;\n\n /** Video title */\n @Prop() videoTitle: string;\n /** Video description */\n @Prop() videoDescription: string;\n /** Context label */\n @Prop() contextLabel: string;\n /** Should context label be visible */\n @Prop() contextLabelVisible: boolean = false;\n /** Preview image url */\n @Prop() previewImageUrl: string;\n /** Url to video, used with preview image */\n @Prop() linkToVideo: string;\n /** Label for play button if preview image is provided */\n @Prop() playButtonLabel: string;\n /** Should play button be visible */\n @Prop() playButtonVisible: boolean = false;\n /** Series label */\n @Prop() seriesLabel: string = \"In this series\";\n /** Series count */\n @Prop() seriesCount: string = null;\n /** Views count number */\n @Prop() views: string;\n /** Label for views number */\n @Prop() viewsLabel: string;\n /** Duration number */\n @Prop() duration: string;\n /** Label for duration number */\n @Prop() durationLabel: string;\n /** Date added date as string */\n @Prop() dateAdded: string;\n /** Label for date added */\n @Prop() dateAddedLabel: string;\n /** Use horizontal layout where metadata is on side */\n @Prop() horizontal: boolean = false;\n\n @Prop() disableLazy: boolean = false;\n\n @Prop() headerstyle: string = \"default\";\n\n @Prop() showMoreLabel: string = \"Show more\";\n\n @Prop() showLessLabel: string = \"Show less\";\n\n @Prop() simplePlayButton: boolean = false;\n\n @Prop() styleList: boolean = false;\n\n @State() descCollapsed: boolean = false;\n\n componentDidLoad() {\n let hyMainDiv = this.el.closest(\".hy-main\");\n if (hyMainDiv) {\n if (!hyMainDiv.classList.contains(\"with-sidebar\")) {\n this.headerstyle = \"large\";\n }\n }\n\n if (this.videoDescription && this.videoDescription.match(/\\S/g).length > 255) {\n this.descCollapsed = true;\n }\n }\n\n renderPreviewWithLink = () => {\n return this.linkToVideo ? (\n <a title={this.videoTitle} href={this.linkToVideo} class=\"hy-video__link-to-video\">\n <img\n loading={this.disableLazy ? \"eager\" : \"lazy\"}\n class=\"hy-video__preview-image\"\n src={this.previewImageUrl}\n alt={this.videoTitle}\n />\n </a>\n ) : (\n <img\n loading={this.disableLazy ? \"eager\" : \"lazy\"}\n class=\"hy-video__preview-image\"\n src={this.previewImageUrl}\n alt={this.videoTitle}\n />\n );\n };\n\n renderPlayButton = () => {\n if (this.simplePlayButton) {\n return (\n <span class=\"hy-video__play__simple\">\n <button type=\"button\">\n <hy-icon icon={\"hy-icon-video\"} class={\"hy-video__play-icon\"} size={20} />\n </button>\n </span>\n );\n } else {\n return (\n <span class=\"hy-video__play\">\n <button type=\"button\">\n <hy-icon icon={\"hy-icon-video\"} class={\"hy-video__play-icon\"} size={20} />\n <span class=\"hy-video__button-label\">{this.playButtonLabel}</span>\n </button>\n </span>\n );\n }\n };\n\n truncate = (str, n) => {\n return str.length > n ? str.substr(0, n - 1) + \"...\" : str;\n };\n\n render() {\n const classAttributes = [\n \"hy-video\",\n this.horizontal ? \"hy-video--horizontal\" : \"\",\n !this.styleList ? `hy-video__${this.headerstyle}` : \"\",\n this.styleList ? \"hy-video--list\" : \"\",\n ].join(\" \");\n\n const maxChars = 255;\n const charCount = this.videoDescription ? this.videoDescription.match(/\\S/g).length : 0;\n\n if (this.linkToVideo && this.styleList) {\n return [\n <a href={this.linkToVideo} class={classAttributes}>\n {this.videoTitle && !this.horizontal && !this.styleList && (\n <hy-heading class=\"hy-video__meta__title\" heading={HeadingVarians.h2}>\n {this.videoTitle}\n </hy-heading>\n )}\n <div class=\"hy-video__video-container\">\n {this.previewImageUrl ? (\n <div>\n {this.renderPreviewWithLink()}\n <slot name=\"video\"></slot>\n </div>\n ) : (\n <slot name=\"video\"></slot>\n )}\n {this.playButtonVisible && this.renderPlayButton()}\n </div>\n <div class=\"hy-video__meta\">\n {(this.videoTitle && this.horizontal) ||\n (this.styleList && (\n <hy-heading class=\"hy-video__meta__title\" heading={HeadingVarians.h3}>\n {this.videoTitle}\n </hy-heading>\n ))}\n {this.contextLabelVisible && <span class=\"hy-video__label\">{this.contextLabel}</span>}\n {(this.duration || this.views || this.dateAdded || this.seriesCount) && (\n <div class=\"hy-video__meta__details\">\n {this.duration && (\n <div class=\"hy-video__meta__details--item\">\n <span class=\"hy-video__meta__label\">{this.durationLabel}</span>\n <span class=\"hy-video__meta__content\">{this.duration}</span>\n </div>\n )}\n {this.views && (\n <div class=\"hy-video__meta__details--item\">\n <span class=\"hy-video__meta__label\">{this.viewsLabel}</span>\n <span class=\"hy-video__meta__content\">{this.views}</span>\n </div>\n )}\n {this.dateAdded && (\n <div class=\"hy-video__meta__details--item\">\n <span class=\"hy-video__meta__label\">{this.dateAddedLabel}</span>\n <span class=\"hy-video__meta__content\">{this.dateAdded}</span>\n </div>\n )}\n {!this.views && this.seriesCount && (\n <div class=\"hy-video__meta__details--item\">\n <span class=\"hy-video__meta__label\">{this.seriesLabel}</span>\n <span class=\"hy-video__meta__content\">{this.seriesCount}</span>\n </div>\n )}\n </div>\n )}\n {this.videoDescription && (\n <div class=\"hy-video__meta__description\" aria-expanded={this.descCollapsed ? \"false\" : \"true\"}>\n <div class=\"hy-video__meta__description__content\">\n {this.descCollapsed ? this.truncate(this.videoDescription, 255) : this.videoDescription}\n </div>\n {charCount > maxChars && (\n <span\n class=\"hy-video__meta__description__more-button\"\n role=\"button\"\n tabindex=\"0\"\n aria-expanded={this.descCollapsed ? \"false\" : \"true\"}\n onClick={() => (this.descCollapsed = !this.descCollapsed)}\n onKeyDown={(e) => {\n if (e.key != \" \") return;\n e.preventDefault();\n this.descCollapsed = !this.descCollapsed;\n }}\n >\n {this.descCollapsed ? this.showMoreLabel : this.showLessLabel}\n </span>\n )}\n </div>\n )}\n </div>\n </a>,\n ];\n } else {\n return [\n <div class={classAttributes}>\n {this.videoTitle && !this.horizontal && !this.styleList && (\n <hy-heading class=\"hy-video__meta__title\" heading={HeadingVarians.h2}>\n {this.videoTitle}\n </hy-heading>\n )}\n <div class=\"hy-video__video-container\">\n {this.previewImageUrl ? (\n <div>\n {this.renderPreviewWithLink()}\n <slot name=\"video\"></slot>\n </div>\n ) : (\n <slot name=\"video\"></slot>\n )}\n {this.playButtonVisible && this.renderPlayButton()}\n </div>\n <div class=\"hy-video__meta\">\n {(this.videoTitle && this.horizontal) ||\n (this.styleList && (\n <hy-heading class=\"hy-video__meta__title\" heading={HeadingVarians.h2}>\n {this.videoTitle}\n </hy-heading>\n ))}\n {this.contextLabelVisible && <span class=\"hy-video__label\">{this.contextLabel}</span>}\n {(this.duration || this.views || this.dateAdded) && (\n <div class=\"hy-video__meta__details\">\n {this.duration && (\n <div class=\"hy-video__meta__details--item\">\n <span class=\"hy-video__meta__label\">{this.durationLabel}</span>\n <span class=\"hy-video__meta__content\">{this.duration}</span>\n </div>\n )}\n {this.views && (\n <div class=\"hy-video__meta__details--item\">\n <span class=\"hy-video__meta__label\">{this.viewsLabel}</span>\n <span class=\"hy-video__meta__content\">{this.views}</span>\n </div>\n )}\n {this.dateAdded && (\n <div class=\"hy-video__meta__details--item\">\n <span class=\"hy-video__meta__label\">{this.dateAddedLabel}</span>\n <span class=\"hy-video__meta__content\">{this.dateAdded}</span>\n </div>\n )}\n </div>\n )}\n {this.videoDescription && (\n <div class=\"hy-video__meta__description\" aria-expanded={this.descCollapsed ? \"false\" : \"true\"}>\n <div class=\"hy-video__meta__description__content\">\n {this.descCollapsed ? this.truncate(this.videoDescription, 255) : this.videoDescription}\n </div>\n {charCount > maxChars && (\n <span\n class=\"hy-video__meta__description__more-button\"\n role=\"button\"\n tabindex=\"0\"\n aria-expanded={this.descCollapsed ? \"false\" : \"true\"}\n onClick={() => (this.descCollapsed = !this.descCollapsed)}\n onKeyDown={(e) => {\n if (e.key != \" \") return;\n e.preventDefault();\n this.descCollapsed = !this.descCollapsed;\n }}\n >\n {this.descCollapsed ? this.showMoreLabel : this.showLessLabel}\n </span>\n )}\n </div>\n )}\n </div>\n </div>,\n <hy-box mb=\"1.75, 1.75, 2, 2.5\" />,\n ];\n }\n }\n}\n"],"mappings":"8FAAA,MAAMA,EAAa,grO,MCQNC,EAAO,M,yBAiElBC,KAAAC,sBAAwB,IACfD,KAAKE,YACVC,EAAA,KAAGC,MAAOJ,KAAKK,WAAYC,KAAMN,KAAKE,YAAaK,MAAM,2BACvDJ,EAAA,OACEK,QAASR,KAAKS,YAAc,QAAU,OACtCF,MAAM,0BACNG,IAAKV,KAAKW,gBACVC,IAAKZ,KAAKK,cAIdF,EAAA,OACEK,QAASR,KAAKS,YAAc,QAAU,OACtCF,MAAM,0BACNG,IAAKV,KAAKW,gBACVC,IAAKZ,KAAKK,aAKhBL,KAAAa,iBAAmB,KACjB,GAAIb,KAAKc,iBAAkB,CACzB,OACEX,EAAA,QAAMI,MAAM,0BACVJ,EAAA,UAAQY,KAAK,UACXZ,EAAA,WAASa,KAAM,gBAAiBT,MAAO,sBAAuBU,KAAM,M,KAIrE,CACL,OACEd,EAAA,QAAMI,MAAM,kBACVJ,EAAA,UAAQY,KAAK,UACXZ,EAAA,WAASa,KAAM,gBAAiBT,MAAO,sBAAuBU,KAAM,KACpEd,EAAA,QAAMI,MAAM,0BAA0BP,KAAKkB,kB,GAOrDlB,KAAAmB,SAAW,CAACC,EAAKC,IACRD,EAAIE,OAASD,EAAID,EAAIG,OAAO,EAAGF,EAAI,GAAK,MAAQD,E,+GAjGlB,M,gHAQF,M,iBAEP,iB,iBAEA,K,2KAcA,M,iBAEC,M,iBAED,U,mBAEE,Y,mBAEA,Y,sBAEI,M,eAEP,M,mBAEK,K,CAElCI,mBACE,IAAIC,EAAYzB,KAAK0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cAAgBjC,KAAKgE,cAAgBhE,KAAKiE,kBAO5D9D,EAAA,UAAQ+D,GAAG,uB"}
1
+ {"version":3,"names":["hyVideoCss","HyVideo","this","renderPreviewWithLink","linkToVideo","h","title","videoTitle","href","class","loading","disableLazy","src","previewImageUrl","alt","renderPlayButton","simplePlayButton","type","icon","size","playButtonLabel","truncate","str","n","length","substr","componentDidLoad","hyMainDiv","el","closest","classList","contains","headerstyle","videoDescription","match","descCollapsed","render","classAttributes","horizontal","styleList","join","maxChars","charCount","heading","HeadingVarians","h2","name","playButtonVisible","h3","contextLabelVisible","contextLabel","duration","views","dateAdded","seriesCount","durationLabel","viewsLabel","dateAddedLabel","seriesLabel","role","tabindex","onClick","onKeyDown","e","key","preventDefault","showMoreLabel","showLessLabel","mb"],"sources":["./src/components/hy-video/hy-video.scss?tag=hy-video","./src/components/hy-video/hy-video.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\na.hy-video {\n text-decoration: none;\n}\n\n.hy-video__video-container {\n aspect-ratio: 16 / 9;\n display: inline-block;\n margin-bottom: 22px;\n position: relative;\n width: 100%;\n\n iframe {\n border: 0;\n height: 100%;\n overflow: hidden;\n width: 100%;\n\n @supports (aspect-ratio: 16 / 9) {\n aspect-ratio: 16 / 9;\n height: auto;\n }\n }\n\n .hy-video__preview-image {\n height: 100%;\n left: 0;\n object-fit: cover;\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n .hy-video__play {\n background-color: var(--grayscale-white);\n left: 50%;\n position: absolute;\n top: 50%;\n transform: translateX(-50%) translateY(-50%);\n\n button {\n align-items: center;\n background: transparent;\n border: none;\n display: flex;\n flex-direction: column;\n padding: 24px;\n\n @include breakpoint($narrow) {\n padding: 36px;\n }\n\n &:hover {\n cursor: pointer;\n }\n }\n\n button .hy-video__button-label {\n @include font-size(15px, 18px);\n\n color: var(--link-blue);\n font-family: var(--main-font-family);\n font-weight: bold;\n letter-spacing: -0.1px;\n text-align: center;\n text-transform: uppercase;\n\n @include breakpoint($narrow) {\n @include font-size(17px, 20px);\n\n letter-spacing: -0.14px;\n }\n\n @include breakpoint($extrawide) {\n @include font-size(17px, 20px);\n\n letter-spacing: -0.16px;\n }\n }\n\n button svg {\n fill: var(--link-blue);\n height: 44px;\n width: 44px;\n\n @include breakpoint($wide) {\n height: 80px;\n width: 80px;\n }\n }\n }\n\n .hy-video__play__simple {\n background-color: rgba(#000000, 0.2);\n position: absolute;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &:hover {\n cursor: pointer;\n }\n\n button {\n align-items: center;\n background: transparent;\n border: none;\n display: flex;\n }\n\n button svg {\n fill: var(--grayscale-white);\n height: 44px;\n width: 44px;\n\n @include breakpoint($wide) {\n height: 80px;\n width: 80px;\n }\n }\n }\n}\n\n.hy-video:not(.hy-video--horizontal) {\n display: flex;\n flex-direction: column;\n\n &:not(.hy-video__default, .hy-video--list) {\n @include breakpoint($xlarge) {\n max-width: 66%;\n }\n }\n}\n\n.hy-video--list {\n .hy-video__meta__details {\n justify-content: flex-start;\n gap: 32px;\n margin: 0;\n }\n .hy-video__meta__details--item {\n margin-right: 0;\n padding-right: 0;\n }\n}\n\n.hy-video__label {\n // font: h5 small size\n @include font-size(12px, 14px);\n display: inline-block;\n background-color: var(--grayscale-black);\n color: var(--grayscale-white);\n font-family: var(--main-font-family);\n font-weight: bold;\n letter-spacing: -0.5px;\n padding: 6px 8px;\n margin: 0 0 22px;\n text-transform: uppercase;\n}\n\n.hy-video.hy-video--horizontal {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n\n @include breakpoint($wide) {\n flex-direction: row;\n }\n\n .hy-video__meta {\n padding-left: 0;\n width: 100%;\n\n @include breakpoint($wide) {\n padding-left: 2.5%;\n width: 57.24%;\n }\n }\n}\n\n.hy-video__meta__title {\n h2.hy-heading,\n h3.hy-heading {\n border: none;\n margin: 8px 0 12px 0 !important;\n hyphens: auto;\n word-break: break-word;\n padding: 0 !important;\n\n @include breakpoint($wide) {\n margin: 0 0 16px 0 !important;\n }\n }\n}\n\n.hy-video__meta__details {\n display: flex;\n flex-direction: row;\n margin-bottom: 12px;\n\n @include breakpoint($wide) {\n margin-bottom: 16px;\n }\n}\n\n.hy-video__meta__details--item {\n display: flex;\n flex-direction: column;\n margin-right: 44px;\n min-width: 87px;\n padding-right: 46px;\n place-content: center space-between;\n}\n\n.hy-video__meta__description__content {\n @include font-size(15px, 22px);\n\n color: var(--grayscale-black);\n display: block;\n font-family: var(--main-font-family);\n letter-spacing: 0;\n width: 100%;\n\n @include breakpoint($narrow) {\n @include font-size(17px, 26px);\n }\n}\n\n.hy-video__meta__description__more-button {\n @include font-size(16px, 24px);\n color: var(--brand-main-light);\n font-family: var(--main-font-family);\n\n &:hover {\n cursor: pointer;\n }\n}\n\n.hy-video__meta__label {\n @include font-size(15px, 18px);\n @include font-weight($bold);\n color: var(--grayscale-black);\n font-family: var(--main-font-family);\n margin-bottom: 4px;\n}\n\n.hy-video__meta__content {\n @include font-size(15px, 22px);\n\n color: var(--grayscale-black);\n font-family: var(--main-font-family);\n letter-spacing: -0.5px;\n\n @include breakpoint($narrow) {\n @include font-size(17px, 26px);\n\n letter-spacing: -0.56px;\n }\n}\n","import {Component, Prop, h, Element, State} from \"@stencil/core\";\nimport {HeadingVarians} from \"../../utils/utils\";\n\n@Component({\n tag: \"hy-video\",\n styleUrl: \"hy-video.scss\",\n shadow: false,\n})\nexport class HyVideo {\n @Element() el: HTMLElement;\n\n /** Video title */\n @Prop() videoTitle: string;\n /** Video description */\n @Prop() videoDescription: string;\n /** Context label */\n @Prop() contextLabel: string;\n /** Should context label be visible */\n @Prop() contextLabelVisible: boolean = false;\n /** Preview image url */\n @Prop() previewImageUrl: string;\n /** Url to video, used with preview image */\n @Prop() linkToVideo: string;\n /** Label for play button if preview image is provided */\n @Prop() playButtonLabel: string;\n /** Should play button be visible */\n @Prop() playButtonVisible: boolean = false;\n /** Series label */\n @Prop() seriesLabel: string = \"In this series\";\n /** Series count */\n @Prop() seriesCount: string = null;\n /** Views count number */\n @Prop() views: string;\n /** Label for views number */\n @Prop() viewsLabel: string;\n /** Duration number */\n @Prop() duration: string;\n /** Label for duration number */\n @Prop() durationLabel: string;\n /** Date added date as string */\n @Prop() dateAdded: string;\n /** Label for date added */\n @Prop() dateAddedLabel: string;\n /** Use horizontal layout where metadata is on side */\n @Prop() horizontal: boolean = false;\n\n @Prop() disableLazy: boolean = false;\n\n @Prop() headerstyle: string = \"default\";\n\n @Prop() showMoreLabel: string = \"Show more\";\n\n @Prop() showLessLabel: string = \"Show less\";\n\n @Prop() simplePlayButton: boolean = false;\n\n @Prop() styleList: boolean = false;\n\n @State() descCollapsed: boolean = false;\n\n componentDidLoad() {\n let hyMainDiv = this.el.closest(\".hy-main\");\n if (hyMainDiv) {\n if (!hyMainDiv.classList.contains(\"with-sidebar\")) {\n this.headerstyle = \"large\";\n }\n }\n\n if (this.videoDescription && this.videoDescription.match(/\\S/g).length > 255) {\n this.descCollapsed = true;\n }\n }\n\n renderPreviewWithLink = () => {\n return this.linkToVideo ? (\n <a title={this.videoTitle} href={this.linkToVideo} class=\"hy-video__link-to-video\">\n <img\n loading={this.disableLazy ? \"eager\" : \"lazy\"}\n class=\"hy-video__preview-image\"\n src={this.previewImageUrl}\n alt={this.videoTitle}\n />\n </a>\n ) : (\n <img\n loading={this.disableLazy ? \"eager\" : \"lazy\"}\n class=\"hy-video__preview-image\"\n src={this.previewImageUrl}\n alt={this.videoTitle}\n />\n );\n };\n\n renderPlayButton = () => {\n if (this.simplePlayButton) {\n return (\n <span class=\"hy-video__play__simple\">\n <button type=\"button\">\n <hy-icon icon={\"hy-icon-video\"} class={\"hy-video__play-icon\"} size={20} />\n </button>\n </span>\n );\n } else {\n return (\n <span class=\"hy-video__play\">\n <button type=\"button\">\n <hy-icon icon={\"hy-icon-video\"} class={\"hy-video__play-icon\"} size={20} />\n <span class=\"hy-video__button-label\">{this.playButtonLabel}</span>\n </button>\n </span>\n );\n }\n };\n\n truncate = (str, n) => {\n return str.length > n ? str.substr(0, n - 1) + \"...\" : str;\n };\n\n render() {\n const classAttributes = [\n \"hy-video\",\n this.horizontal ? \"hy-video--horizontal\" : \"\",\n !this.styleList ? `hy-video__${this.headerstyle}` : \"\",\n this.styleList ? \"hy-video--list\" : \"\",\n ].join(\" \");\n\n const maxChars = 255;\n const charCount = this.videoDescription ? this.videoDescription.match(/\\S/g).length : 0;\n\n if (this.linkToVideo && this.styleList) {\n return [\n <a href={this.linkToVideo} class={classAttributes}>\n {this.videoTitle && !this.horizontal && !this.styleList && (\n <hy-heading class=\"hy-video__meta__title\" heading={HeadingVarians.h2}>\n {this.videoTitle}\n </hy-heading>\n )}\n <div class=\"hy-video__video-container\">\n {this.previewImageUrl ? (\n <div>\n {this.renderPreviewWithLink()}\n <slot name=\"video\"></slot>\n </div>\n ) : (\n <slot name=\"video\"></slot>\n )}\n {this.playButtonVisible && this.renderPlayButton()}\n </div>\n <div class=\"hy-video__meta\">\n {(this.videoTitle && this.horizontal) ||\n (this.styleList && (\n <hy-heading class=\"hy-video__meta__title\" heading={HeadingVarians.h3}>\n {this.videoTitle}\n </hy-heading>\n ))}\n {this.contextLabelVisible && <span class=\"hy-video__label\">{this.contextLabel}</span>}\n {(this.duration || this.views || this.dateAdded || this.seriesCount) && (\n <div class=\"hy-video__meta__details\">\n {this.duration && (\n <div class=\"hy-video__meta__details--item\">\n <span class=\"hy-video__meta__label\">{this.durationLabel}</span>\n <span class=\"hy-video__meta__content\">{this.duration}</span>\n </div>\n )}\n {this.views && (\n <div class=\"hy-video__meta__details--item\">\n <span class=\"hy-video__meta__label\">{this.viewsLabel}</span>\n <span class=\"hy-video__meta__content\">{this.views}</span>\n </div>\n )}\n {this.dateAdded && (\n <div class=\"hy-video__meta__details--item\">\n <span class=\"hy-video__meta__label\">{this.dateAddedLabel}</span>\n <span class=\"hy-video__meta__content\">{this.dateAdded}</span>\n </div>\n )}\n {!this.views && this.seriesCount && (\n <div class=\"hy-video__meta__details--item\">\n <span class=\"hy-video__meta__label\">{this.seriesLabel}</span>\n <span class=\"hy-video__meta__content\">{this.seriesCount}</span>\n </div>\n )}\n </div>\n )}\n {this.videoDescription && (\n <div class=\"hy-video__meta__description\" aria-expanded={this.descCollapsed ? \"false\" : \"true\"}>\n <div class=\"hy-video__meta__description__content\">\n {this.descCollapsed ? this.truncate(this.videoDescription, 255) : this.videoDescription}\n </div>\n {charCount > maxChars && (\n <span\n class=\"hy-video__meta__description__more-button\"\n role=\"button\"\n tabindex=\"0\"\n aria-expanded={this.descCollapsed ? \"false\" : \"true\"}\n onClick={() => (this.descCollapsed = !this.descCollapsed)}\n onKeyDown={(e) => {\n if (e.key != \" \") return;\n e.preventDefault();\n this.descCollapsed = !this.descCollapsed;\n }}\n >\n {this.descCollapsed ? this.showMoreLabel : this.showLessLabel}\n </span>\n )}\n </div>\n )}\n </div>\n </a>,\n ];\n } else {\n return [\n <div class={classAttributes}>\n {this.videoTitle && !this.horizontal && !this.styleList && (\n <hy-heading class=\"hy-video__meta__title\" heading={HeadingVarians.h2}>\n {this.videoTitle}\n </hy-heading>\n )}\n <div class=\"hy-video__video-container\">\n {this.previewImageUrl ? (\n <div>\n {this.renderPreviewWithLink()}\n <slot name=\"video\"></slot>\n </div>\n ) : (\n <slot name=\"video\"></slot>\n )}\n {this.playButtonVisible && this.renderPlayButton()}\n </div>\n <div class=\"hy-video__meta\">\n {(this.videoTitle && this.horizontal) ||\n (this.styleList && (\n <hy-heading class=\"hy-video__meta__title\" heading={HeadingVarians.h2}>\n {this.videoTitle}\n </hy-heading>\n ))}\n {this.contextLabelVisible && <span class=\"hy-video__label\">{this.contextLabel}</span>}\n {(this.duration || this.views || this.dateAdded) && (\n <div class=\"hy-video__meta__details\">\n {this.duration && (\n <div class=\"hy-video__meta__details--item\">\n <span class=\"hy-video__meta__label\">{this.durationLabel}</span>\n <span class=\"hy-video__meta__content\">{this.duration}</span>\n </div>\n )}\n {this.views && (\n <div class=\"hy-video__meta__details--item\">\n <span class=\"hy-video__meta__label\">{this.viewsLabel}</span>\n <span class=\"hy-video__meta__content\">{this.views}</span>\n </div>\n )}\n {this.dateAdded && (\n <div class=\"hy-video__meta__details--item\">\n <span class=\"hy-video__meta__label\">{this.dateAddedLabel}</span>\n <span class=\"hy-video__meta__content\">{this.dateAdded}</span>\n </div>\n )}\n </div>\n )}\n {this.videoDescription && (\n <div class=\"hy-video__meta__description\" aria-expanded={this.descCollapsed ? \"false\" : \"true\"}>\n <div class=\"hy-video__meta__description__content\">\n {this.descCollapsed ? this.truncate(this.videoDescription, 255) : this.videoDescription}\n </div>\n {charCount > maxChars && (\n <span\n class=\"hy-video__meta__description__more-button\"\n role=\"button\"\n tabindex=\"0\"\n aria-expanded={this.descCollapsed ? \"false\" : \"true\"}\n onClick={() => (this.descCollapsed = !this.descCollapsed)}\n onKeyDown={(e) => {\n if (e.key != \" \") return;\n e.preventDefault();\n this.descCollapsed = !this.descCollapsed;\n }}\n >\n {this.descCollapsed ? this.showMoreLabel : this.showLessLabel}\n </span>\n )}\n </div>\n )}\n </div>\n </div>,\n <hy-box mb=\"1.75, 1.75, 2, 2.5\" />,\n ];\n }\n }\n}\n"],"mappings":"8FAAA,MAAMA,EAAa,0+N,MCQNC,EAAO,M,yBAiElBC,KAAAC,sBAAwB,IACfD,KAAKE,YACVC,EAAA,KAAGC,MAAOJ,KAAKK,WAAYC,KAAMN,KAAKE,YAAaK,MAAM,2BACvDJ,EAAA,OACEK,QAASR,KAAKS,YAAc,QAAU,OACtCF,MAAM,0BACNG,IAAKV,KAAKW,gBACVC,IAAKZ,KAAKK,cAIdF,EAAA,OACEK,QAASR,KAAKS,YAAc,QAAU,OACtCF,MAAM,0BACNG,IAAKV,KAAKW,gBACVC,IAAKZ,KAAKK,aAKhBL,KAAAa,iBAAmB,KACjB,GAAIb,KAAKc,iBAAkB,CACzB,OACEX,EAAA,QAAMI,MAAM,0BACVJ,EAAA,UAAQY,KAAK,UACXZ,EAAA,WAASa,KAAM,gBAAiBT,MAAO,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,kBACJ5B,EAAA,OAAKI,MAAM,8BAA6B,gBAAgBP,KAAKiC,cAAgB,QAAU,QACrF9B,EAAA,OAAKI,MAAM,wCACRP,KAAKiC,cAAgBjC,KAAKmB,SAASnB,KAAK+B,iBAAkB,KAAO/B,KAAK+B,kBAExES,EAAYD,GACXpC,EAAA,QACEI,MAAM,2CACNkD,KAAK,SACLC,SAAS,IAAG,gBACG1D,KAAKiC,cAAgB,QAAU,OAC9C0B,QAAS,IAAO3D,KAAKiC,eAAiBjC,KAAKiC,cAC3C2B,UAAYC,IACV,GAAIA,EAAEC,KAAO,IAAK,OAClBD,EAAEE,iBACF/D,KAAKiC,eAAiBjC,KAAKiC,aAAa,GAGzCjC,KAAKiC,cAAgBjC,KAAKgE,cAAgBhE,KAAKiE,kBAO5D9D,EAAA,UAAQ+D,GAAG,uB"}
@@ -5,6 +5,11 @@ export interface FooterBaseLinks {
5
5
  mainlink?: boolean;
6
6
  items: Array<FooterBaseLinks>;
7
7
  }
8
+ export interface FooterPostSectionLinks {
9
+ label: string;
10
+ url: string;
11
+ external: boolean;
12
+ }
8
13
  export interface FooterBaseSome {
9
14
  label: string;
10
15
  url: string;
@@ -39,10 +44,15 @@ export declare class HyFooterBase implements ComponentInterface {
39
44
  copyrightText: string;
40
45
  private _dataFooterBaseLinks;
41
46
  private _dataFooterBaseSome;
47
+ private _dataFooterPostSectionLinks;
42
48
  /**
43
49
  * Footer links to be displayed
44
50
  */
45
51
  dataFooterBaseLinks: FooterBaseLinks[] | string;
52
+ /**
53
+ * Footer post section links
54
+ */
55
+ dataFooterPostSectionLinks: FooterPostSectionLinks[] | string;
46
56
  /**
47
57
  * Footer some links
48
58
  */
@@ -1,3 +1,4 @@
1
+ import { EventEmitter } from "../../stencil-public-runtime";
1
2
  export interface IDropdownItem {
2
3
  id: string | number;
3
4
  label: string;
@@ -16,15 +17,28 @@ export declare class HyDropdown {
16
17
  dropdownId: string;
17
18
  dropdownOptions: IDropdownItem[] | string;
18
19
  defaultLabel: string;
20
+ type: string;
19
21
  defaultOption: string | number;
20
22
  isPanelOpen: boolean;
21
23
  isChecked: boolean;
22
24
  currentSingle: DefaultValue[];
25
+ currentMulti: IDropdownItem[];
26
+ focusedOptionIndex: number;
27
+ dropdownPanelToggled: EventEmitter;
28
+ dropdropValueChange: EventEmitter;
29
+ dropdropMultiValueChange: EventEmitter;
30
+ dropdownKeyPress: EventEmitter;
23
31
  componentWillLoad(): Promise<void>;
24
32
  componentWillUpdate(): void;
25
33
  watchPropHandler(newValue: string | number, oldValue: string | number): void;
26
- handlePanelToggle(): void;
27
- handleClick(event: any): void;
28
- handleSingleClick(event: any): void;
34
+ panelListener(e: any): void;
35
+ private handleMultiClick;
36
+ private handleSingleClick;
37
+ handleKeyDown(event: KeyboardEvent): void;
38
+ private handlePanelToggle;
39
+ handlePanelClickOutside(e: any): void;
40
+ private handleOptionSingleClick;
41
+ private handleMultiOptionClick;
42
+ private handleOptionHover;
29
43
  render(): any;
30
44
  }
@@ -12,7 +12,7 @@ import { Breadcrumb } from "./components/hy-breadcrumbs/hy-breadcrumbs";
12
12
  import { TagValue } from "./components/hy-content-lists/hy-content-list-item/hy-content-list-item";
13
13
  import { IDropdownItem } from "./components/hy-dropdown/hy-dropdown";
14
14
  import { IFilterGroupFilter } from "./components/hy-filter-group/hy-filter-group";
15
- import { FooterBaseLinks, FooterBaseSome } from "./components/footer/hy-footer-base/hy-footer-base";
15
+ import { FooterBaseLinks, FooterBaseSome, FooterPostSectionLinks } from "./components/footer/hy-footer-base/hy-footer-base";
16
16
  import { FooterInfoLinks, LuomusFooterContent } from "./components/footer/hy-footer-info/hy-footer-info";
17
17
  import { ListItemValue } from "./components/hy-general-list/hy-general-list";
18
18
  import { ImageSrcSet as ImageSrcSet1 } from "./components/hy-hero/hy-hero";
@@ -43,7 +43,7 @@ export { Breadcrumb } from "./components/hy-breadcrumbs/hy-breadcrumbs";
43
43
  export { TagValue } from "./components/hy-content-lists/hy-content-list-item/hy-content-list-item";
44
44
  export { IDropdownItem } from "./components/hy-dropdown/hy-dropdown";
45
45
  export { IFilterGroupFilter } from "./components/hy-filter-group/hy-filter-group";
46
- export { FooterBaseLinks, FooterBaseSome } from "./components/footer/hy-footer-base/hy-footer-base";
46
+ export { FooterBaseLinks, FooterBaseSome, FooterPostSectionLinks } from "./components/footer/hy-footer-base/hy-footer-base";
47
47
  export { FooterInfoLinks, LuomusFooterContent } from "./components/footer/hy-footer-info/hy-footer-info";
48
48
  export { ListItemValue } from "./components/hy-general-list/hy-general-list";
49
49
  export { ImageSrcSet as ImageSrcSet1 } from "./components/hy-hero/hy-hero";
@@ -278,15 +278,7 @@ export namespace Components {
278
278
  "dropdownLabel": string;
279
279
  "dropdownOptions": IDropdownItem[] | string;
280
280
  "single": boolean;
281
- }
282
- interface HyDropdownPanel {
283
- "isHidden": boolean;
284
- }
285
- interface HyDropdownPanelItem {
286
- "dropdownItemId": string | number;
287
- "dropdownItemLabel": string;
288
- "dropdownItemValue": string | number;
289
- "isLast"?: boolean;
281
+ "type": string;
290
282
  }
291
283
  interface HyEventItem {
292
284
  "dateLong": string;
@@ -355,6 +347,10 @@ export namespace Components {
355
347
  * Footer some links
356
348
  */
357
349
  "dataFooterBaseSome": FooterBaseSome[] | string;
350
+ /**
351
+ * Footer post section links
352
+ */
353
+ "dataFooterPostSectionLinks": FooterPostSectionLinks[] | string;
358
354
  /**
359
355
  * Logo label
360
356
  */
@@ -928,6 +924,10 @@ export namespace Components {
928
924
  "viewsLabel": string;
929
925
  }
930
926
  }
927
+ export interface HyDropdownCustomEvent<T> extends CustomEvent<T> {
928
+ detail: T;
929
+ target: HTMLHyDropdownElement;
930
+ }
931
931
  export interface HyMenuLanguageCustomEvent<T> extends CustomEvent<T> {
932
932
  detail: T;
933
933
  target: HTMLHyMenuLanguageElement;
@@ -1041,18 +1041,6 @@ declare global {
1041
1041
  prototype: HTMLHyDropdownElement;
1042
1042
  new (): HTMLHyDropdownElement;
1043
1043
  };
1044
- interface HTMLHyDropdownPanelElement extends Components.HyDropdownPanel, HTMLStencilElement {
1045
- }
1046
- var HTMLHyDropdownPanelElement: {
1047
- prototype: HTMLHyDropdownPanelElement;
1048
- new (): HTMLHyDropdownPanelElement;
1049
- };
1050
- interface HTMLHyDropdownPanelItemElement extends Components.HyDropdownPanelItem, HTMLStencilElement {
1051
- }
1052
- var HTMLHyDropdownPanelItemElement: {
1053
- prototype: HTMLHyDropdownPanelItemElement;
1054
- new (): HTMLHyDropdownPanelItemElement;
1055
- };
1056
1044
  interface HTMLHyEventItemElement extends Components.HyEventItem, HTMLStencilElement {
1057
1045
  }
1058
1046
  var HTMLHyEventItemElement: {
@@ -1478,8 +1466,6 @@ declare global {
1478
1466
  "hy-cta-button": HTMLHyCtaButtonElement;
1479
1467
  "hy-cta-link": HTMLHyCtaLinkElement;
1480
1468
  "hy-dropdown": HTMLHyDropdownElement;
1481
- "hy-dropdown-panel": HTMLHyDropdownPanelElement;
1482
- "hy-dropdown-panel-item": HTMLHyDropdownPanelItemElement;
1483
1469
  "hy-event-item": HTMLHyEventItemElement;
1484
1470
  "hy-events": HTMLHyEventsElement;
1485
1471
  "hy-filter-group": HTMLHyFilterGroupElement;
@@ -1760,16 +1746,12 @@ declare namespace LocalJSX {
1760
1746
  "dropdownId"?: string;
1761
1747
  "dropdownLabel"?: string;
1762
1748
  "dropdownOptions"?: IDropdownItem[] | string;
1749
+ "onDropdownKeyPress"?: (event: HyDropdownCustomEvent<any>) => void;
1750
+ "onDropdownMultiValueChanged"?: (event: HyDropdownCustomEvent<any>) => void;
1751
+ "onDropdownPanelToggled"?: (event: HyDropdownCustomEvent<any>) => void;
1752
+ "onDropdownValueChanged"?: (event: HyDropdownCustomEvent<any>) => void;
1763
1753
  "single"?: boolean;
1764
- }
1765
- interface HyDropdownPanel {
1766
- "isHidden"?: boolean;
1767
- }
1768
- interface HyDropdownPanelItem {
1769
- "dropdownItemId"?: string | number;
1770
- "dropdownItemLabel"?: string;
1771
- "dropdownItemValue"?: string | number;
1772
- "isLast"?: boolean;
1754
+ "type"?: string;
1773
1755
  }
1774
1756
  interface HyEventItem {
1775
1757
  "dateLong"?: string;
@@ -1838,6 +1820,10 @@ declare namespace LocalJSX {
1838
1820
  * Footer some links
1839
1821
  */
1840
1822
  "dataFooterBaseSome"?: FooterBaseSome[] | string;
1823
+ /**
1824
+ * Footer post section links
1825
+ */
1826
+ "dataFooterPostSectionLinks"?: FooterPostSectionLinks[] | string;
1841
1827
  /**
1842
1828
  * Logo label
1843
1829
  */
@@ -2435,8 +2421,6 @@ declare namespace LocalJSX {
2435
2421
  "hy-cta-button": HyCtaButton;
2436
2422
  "hy-cta-link": HyCtaLink;
2437
2423
  "hy-dropdown": HyDropdown;
2438
- "hy-dropdown-panel": HyDropdownPanel;
2439
- "hy-dropdown-panel-item": HyDropdownPanelItem;
2440
2424
  "hy-event-item": HyEventItem;
2441
2425
  "hy-events": HyEvents;
2442
2426
  "hy-filter-group": HyFilterGroup;
@@ -2527,8 +2511,6 @@ declare module "@stencil/core" {
2527
2511
  "hy-cta-button": LocalJSX.HyCtaButton & JSXBase.HTMLAttributes<HTMLHyCtaButtonElement>;
2528
2512
  "hy-cta-link": LocalJSX.HyCtaLink & JSXBase.HTMLAttributes<HTMLHyCtaLinkElement>;
2529
2513
  "hy-dropdown": LocalJSX.HyDropdown & JSXBase.HTMLAttributes<HTMLHyDropdownElement>;
2530
- "hy-dropdown-panel": LocalJSX.HyDropdownPanel & JSXBase.HTMLAttributes<HTMLHyDropdownPanelElement>;
2531
- "hy-dropdown-panel-item": LocalJSX.HyDropdownPanelItem & JSXBase.HTMLAttributes<HTMLHyDropdownPanelItemElement>;
2532
2514
  "hy-event-item": LocalJSX.HyEventItem & JSXBase.HTMLAttributes<HTMLHyEventItemElement>;
2533
2515
  "hy-events": LocalJSX.HyEvents & JSXBase.HTMLAttributes<HTMLHyEventsElement>;
2534
2516
  "hy-filter-group": LocalJSX.HyFilterGroup & JSXBase.HTMLAttributes<HTMLHyFilterGroupElement>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcenteratunihelsinki/huds-lib",
3
- "version": "0.8.68",
3
+ "version": "0.8.70",
4
4
  "description": "Helsinki University Design System library",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -68,5 +68,5 @@
68
68
  "pre-commit": "pretty-quick --staged"
69
69
  }
70
70
  },
71
- "gitHead": "7a2ac708c199b2f97637924fd4214b6be98519a0"
71
+ "gitHead": "c8eb758490d770f9294d7bfce2481a4dc67a961f"
72
72
  }
@@ -1,11 +0,0 @@
1
- import type { Components, JSX } from "../dist/types/components";
2
-
3
- interface HyDropdownPanelItem extends Components.HyDropdownPanelItem, HTMLElement {}
4
- export const HyDropdownPanelItem: {
5
- prototype: HyDropdownPanelItem;
6
- new (): HyDropdownPanelItem;
7
- };
8
- /**
9
- * Used to define this component and all nested components recursively.
10
- */
11
- export const defineCustomElement: () => void;
@@ -1,8 +0,0 @@
1
- import { H as HyDropdownPanelItem$1, d as defineCustomElement$1 } from './hy-dropdown.panel.item.js';
2
-
3
- const HyDropdownPanelItem = HyDropdownPanelItem$1;
4
- const defineCustomElement = defineCustomElement$1;
5
-
6
- export { HyDropdownPanelItem, defineCustomElement };
7
-
8
- //# sourceMappingURL=hy-dropdown-panel-item.js.map
@@ -1 +0,0 @@
1
- {"file":"hy-dropdown-panel-item.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1,11 +0,0 @@
1
- import type { Components, JSX } from "../dist/types/components";
2
-
3
- interface HyDropdownPanel extends Components.HyDropdownPanel, HTMLElement {}
4
- export const HyDropdownPanel: {
5
- prototype: HyDropdownPanel;
6
- new (): HyDropdownPanel;
7
- };
8
- /**
9
- * Used to define this component and all nested components recursively.
10
- */
11
- export const defineCustomElement: () => void;
@@ -1,8 +0,0 @@
1
- import { H as HyDropdownPanel$1, d as defineCustomElement$1 } from './hy-dropdown.panel.js';
2
-
3
- const HyDropdownPanel = HyDropdownPanel$1;
4
- const defineCustomElement = defineCustomElement$1;
5
-
6
- export { HyDropdownPanel, defineCustomElement };
7
-
8
- //# sourceMappingURL=hy-dropdown-panel.js.map
@@ -1 +0,0 @@
1
- {"file":"hy-dropdown-panel.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1,43 +0,0 @@
1
- import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
- import { d as defineCustomElement$1 } from './icon.js';
3
-
4
- const HyDropdownPanelItem = /*@__PURE__*/ proxyCustomElement(class HyDropdownPanelItem extends HTMLElement {
5
- constructor() {
6
- super();
7
- this.__registerHost();
8
- this.isLast = false;
9
- this.dropdownItemId = undefined;
10
- this.dropdownItemValue = undefined;
11
- this.dropdownItemLabel = undefined;
12
- }
13
- render() {
14
- return (h("li", { class: `hy-dropdown__panel-item ${this.isLast ? "is-last" : ""}` }, h("input", { type: "checkbox", class: "hy-dropdown__checkbox", id: `${this.dropdownItemId}`, value: `${this.dropdownItemValue}` }), h("label", { class: "hy-dropdown__label", htmlFor: `${this.dropdownItemId}` }, this.dropdownItemLabel, h("hy-icon", { class: "hy-dropdown__label-icon", icon: "hy-icon-done", size: 14, "aria-hidden": "true" }))));
15
- }
16
- }, [0, "hy-dropdown-panel-item", {
17
- "isLast": [4, "is-last"],
18
- "dropdownItemId": [8, "dropdown-item-id"],
19
- "dropdownItemValue": [8, "dropdown-item-value"],
20
- "dropdownItemLabel": [1, "dropdown-item-label"]
21
- }]);
22
- function defineCustomElement() {
23
- if (typeof customElements === "undefined") {
24
- return;
25
- }
26
- const components = ["hy-dropdown-panel-item", "hy-icon"];
27
- components.forEach(tagName => { switch (tagName) {
28
- case "hy-dropdown-panel-item":
29
- if (!customElements.get(tagName)) {
30
- customElements.define(tagName, HyDropdownPanelItem);
31
- }
32
- break;
33
- case "hy-icon":
34
- if (!customElements.get(tagName)) {
35
- defineCustomElement$1();
36
- }
37
- break;
38
- } });
39
- }
40
-
41
- export { HyDropdownPanelItem as H, defineCustomElement as d };
42
-
43
- //# sourceMappingURL=hy-dropdown.panel.item.js.map
@@ -1 +0,0 @@
1
- {"file":"hy-dropdown.panel.item.js","mappings":";;;MAMa,mBAAmB;;;;kBACH,KAAK;;;;;EAKhC,MAAM;IACJ,QACE,UAAI,KAAK,EAAE,2BAA2B,IAAI,CAAC,MAAM,GAAG,SAAS,GAAG,EAAE,EAAE,IAClE,aACE,IAAI,EAAC,UAAU,EACf,KAAK,EAAC,uBAAuB,EAC7B,EAAE,EAAE,GAAG,IAAI,CAAC,cAAc,EAAE,EAC5B,KAAK,EAAE,GAAG,IAAI,CAAC,iBAAiB,EAAE,GAClC,EACF,aAAO,KAAK,EAAC,oBAAoB,EAAC,OAAO,EAAE,GAAG,IAAI,CAAC,cAAc,EAAE,IAChE,IAAI,CAAC,iBAAiB,EACvB,eAAS,KAAK,EAAC,yBAAyB,EAAC,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,EAAE,iBAAc,MAAM,GAAG,CACxF,CACL,EACL;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/hy-dropdown/hy-dropdown.panel.item.tsx"],"sourcesContent":["import {Component, h, Prop} from \"@stencil/core\";\n\n@Component({\n tag: \"hy-dropdown-panel-item\",\n shadow: false,\n})\nexport class HyDropdownPanelItem {\n @Prop() isLast?: boolean = false;\n @Prop() dropdownItemId: string | number;\n @Prop() dropdownItemValue: string | number;\n @Prop() dropdownItemLabel: string;\n\n render() {\n return (\n <li class={`hy-dropdown__panel-item ${this.isLast ? \"is-last\" : \"\"}`}>\n <input\n type=\"checkbox\"\n class=\"hy-dropdown__checkbox\"\n id={`${this.dropdownItemId}`}\n value={`${this.dropdownItemValue}`}\n />\n <label class=\"hy-dropdown__label\" htmlFor={`${this.dropdownItemId}`}>\n {this.dropdownItemLabel}\n <hy-icon class=\"hy-dropdown__label-icon\" icon={\"hy-icon-done\"} size={14} aria-hidden=\"true\" />\n </label>\n </li>\n );\n }\n}\n"],"version":3}
@@ -1,31 +0,0 @@
1
- import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
-
3
- const HyDropdownPanel = /*@__PURE__*/ proxyCustomElement(class HyDropdownPanel extends HTMLElement {
4
- constructor() {
5
- super();
6
- this.__registerHost();
7
- this.isHidden = undefined;
8
- }
9
- render() {
10
- return (h("ul", { id: "dropdownPanel", class: `hy-dropdown__panel ${this.isHidden ? "is-hidden" : ""}`, "aria-hidden": `${this.isHidden || false}`, role: "region", "aria-labelledby": "dropdownToggle" }, h("slot", null)));
11
- }
12
- }, [4, "hy-dropdown-panel", {
13
- "isHidden": [4, "is-hidden"]
14
- }]);
15
- function defineCustomElement() {
16
- if (typeof customElements === "undefined") {
17
- return;
18
- }
19
- const components = ["hy-dropdown-panel"];
20
- components.forEach(tagName => { switch (tagName) {
21
- case "hy-dropdown-panel":
22
- if (!customElements.get(tagName)) {
23
- customElements.define(tagName, HyDropdownPanel);
24
- }
25
- break;
26
- } });
27
- }
28
-
29
- export { HyDropdownPanel as H, defineCustomElement as d };
30
-
31
- //# sourceMappingURL=hy-dropdown.panel.js.map
@@ -1 +0,0 @@
1
- {"file":"hy-dropdown.panel.js","mappings":";;MAMa,eAAe;;;;;;EAG1B,MAAM;IACJ,QACE,UACE,EAAE,EAAC,eAAe,EAClB,KAAK,EAAE,sBAAsB,IAAI,CAAC,QAAQ,GAAG,WAAW,GAAG,EAAE,EAAE,iBAClD,GAAG,IAAI,CAAC,QAAQ,IAAI,KAAK,EAAE,EACxC,IAAI,EAAC,QAAQ,qBACG,gBAAgB,IAEhC,eAAQ,CACL,EACL;GACH;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/hy-dropdown/hy-dropdown.panel.tsx"],"sourcesContent":["import {Component, h, Prop} from \"@stencil/core\";\n\n@Component({\n tag: \"hy-dropdown-panel\",\n shadow: false,\n})\nexport class HyDropdownPanel {\n @Prop() isHidden: boolean;\n\n render() {\n return (\n <ul\n id=\"dropdownPanel\"\n class={`hy-dropdown__panel ${this.isHidden ? \"is-hidden\" : \"\"}`}\n aria-hidden={`${this.isHidden || false}`}\n role=\"region\"\n aria-labelledby=\"dropdownToggle\"\n >\n <slot />\n </ul>\n );\n }\n}\n"],"version":3}