@itcenteratunihelsinki/huds-lib 0.8.61 → 0.8.62
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/hy-menu-main-group2.js +20 -27
- package/components/hy-menu-main-group2.js.map +1 -1
- package/components/menu-language.js +4 -3
- package/components/menu-language.js.map +1 -1
- package/components/site-search.js +14 -78
- package/components/site-search.js.map +1 -1
- package/dist/cjs/huds-lib.cjs.js +1 -1
- package/dist/cjs/hy-breadcrumbs_15.cjs.entry.js +17 -80
- package/dist/cjs/hy-breadcrumbs_15.cjs.entry.js.map +1 -1
- package/dist/cjs/hy-menu-main-group.cjs.entry.js +19 -26
- package/dist/cjs/hy-menu-main-group.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/hy-navigation/hy-menu-main-group/hy-menu-main-group.js +24 -31
- package/dist/collection/components/hy-navigation/hy-menu-main-group/hy-menu-main-group.js.map +1 -1
- package/dist/collection/components/hy-navigation/menu-language/menu-language.js +4 -3
- package/dist/collection/components/hy-navigation/menu-language/menu-language.js.map +1 -1
- package/dist/collection/components/hy-site-header/site-search/site-search.css +13 -2
- package/dist/collection/components/hy-site-header/site-search/site-search.js +36 -82
- package/dist/collection/components/hy-site-header/site-search/site-search.js.map +1 -1
- package/dist/esm/huds-lib.js +1 -1
- package/dist/esm/hy-breadcrumbs_15.entry.js +17 -80
- package/dist/esm/hy-breadcrumbs_15.entry.js.map +1 -1
- package/dist/esm/hy-menu-main-group.entry.js +19 -26
- package/dist/esm/hy-menu-main-group.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/huds-lib/huds-lib.esm.js +1 -1
- package/dist/huds-lib/huds-lib.esm.js.map +1 -1
- package/dist/huds-lib/hy-breadcrumbs_15.entry.js +1 -1
- package/dist/huds-lib/hy-breadcrumbs_15.entry.js.map +1 -1
- package/dist/huds-lib/hy-menu-main-group.entry.js +1 -1
- package/dist/huds-lib/hy-menu-main-group.entry.js.map +1 -1
- package/dist/types/components/hy-navigation/hy-menu-main-group/hy-menu-main-group.d.ts +2 -5
- package/dist/types/components/hy-site-header/site-search/site-search.d.ts +1 -6
- package/package.json +2 -2
|
@@ -419,9 +419,10 @@ const MenuLanguage = class {
|
|
|
419
419
|
}
|
|
420
420
|
})), h("hy-icon", { icon: "hy-icon-caret-down", size: 8, fill: svgColor })), h("div", { class: {
|
|
421
421
|
"menu-language__dropdown": true,
|
|
422
|
-
}, "aria-hidden": `${!this.isMenuOpen}` },
|
|
423
|
-
|
|
424
|
-
|
|
422
|
+
}, "aria-hidden": `${!this.isMenuOpen}` }, this.isMenuOpen &&
|
|
423
|
+
h("ul", { class: "menu-language__links" }, this._dataMenuLanguage.map((item) => {
|
|
424
|
+
return (h("hy-menu-language-item", { "lang-code": item.langCode, url: item.url, label: item.label, abbr: item.abbr, "is-active": item.isActive, "is-disabled": item.isDisabled }));
|
|
425
|
+
})))));
|
|
425
426
|
}
|
|
426
427
|
get el() { return getElement(this); }
|
|
427
428
|
};
|
|
@@ -788,7 +789,7 @@ const SiteLogo = class {
|
|
|
788
789
|
};
|
|
789
790
|
SiteLogo.style = siteLogoCss;
|
|
790
791
|
|
|
791
|
-
const siteSearchCss = ":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}.button--search{font-size:0.75rem;line-height:24px;font-weight:400;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:transparent;border:0 none;color:var(--brand-main-nearly-black);display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;font-family:var(--main-font-family);height:100%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;letter-spacing:-0.5px;width:44px}@media (min-width: 75.0625rem){.button--search{display:inline-grid;grid-template-columns:repeat(2, auto);gap:4px;width:auto}}@media (min-width: 1601px){.button--search{font-size:0.875rem;line-height:24px}}.button--search:hover:not([disabled]){color:var(--brand-main);cursor:pointer}.button--search:hover:not([disabled]) svg{fill:var(--brand-main)}.button--search:focus:not([disabled]){outline:solid 2px var(--additional-yellow);outline-offset:2px}.button--search.is-active,.button--search[aria-expanded=true]{position:relative}.button--search.is-active:after,.button--search[aria-expanded=true]:after{content:\"\";position:absolute;height:4px;right:0;bottom:-1px;left:0;background-color:var(--grayscale-black)}.is-group .button--search{color:var(--grayscale-white)}.is-group .button--search:hover:not([disabled]){color:var(--grayscale-medium);cursor:pointer}.is-group .button--search:hover:not([disabled]) svg{fill:var(--grayscale-medium)}.button--search.is-open--menu{position:absolute;right:50px;top:15px;z-index:101}.button--search__label{display:none;visibility:hidden}@media (min-width: 75.0625rem){.button--search__label{display:block;visibility:visible;-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}}.site-search{height:100%}.site-search__panel{display:none}.site-search__panel__is-open{background-color
|
|
792
|
+
const siteSearchCss = ":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}.button--search{font-size:0.75rem;line-height:24px;font-weight:400;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:transparent;border:0 none;color:var(--brand-main-nearly-black);display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;font-family:var(--main-font-family);height:100%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;letter-spacing:-0.5px;width:44px}@media (min-width: 75.0625rem){.button--search{display:inline-grid;grid-template-columns:repeat(2, auto);gap:4px;width:auto}}@media (min-width: 1601px){.button--search{font-size:0.875rem;line-height:24px}}.button--search:hover:not([disabled]){color:var(--brand-main);cursor:pointer}.button--search:hover:not([disabled]) svg{fill:var(--brand-main)}.button--search:focus:not([disabled]){outline:solid 2px var(--additional-yellow);outline-offset:2px}.button--search.is-active,.button--search[aria-expanded=true]{position:relative}.button--search.is-active:after,.button--search[aria-expanded=true]:after{content:\"\";position:absolute;height:4px;right:0;bottom:-1px;left:0;background-color:var(--grayscale-black)}.is-group .button--search{color:var(--grayscale-white)}.is-group .button--search:hover:not([disabled]){color:var(--grayscale-medium);cursor:pointer}.is-group .button--search:hover:not([disabled]) svg{fill:var(--grayscale-medium)}.button--search.is-open--menu{position:absolute;right:50px;top:15px;z-index:101}.button--search__label{display:none;visibility:hidden}@media (min-width: 75.0625rem){.button--search__label{display:block;visibility:visible;-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}}.site-search{height:100%}.site-search__panel{display:none}.site-search__panel__is-open{background-color:rgba(0, 0, 0, 0.5);border-top:1px solid rgba(0, 0, 0, 0.1);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;font-family:var(--main-font-family);left:0;height:100vh;position:absolute;width:100%;z-index:520}.site-search__panel__title__group{-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline;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: 60rem){.site-search__panel__title__group{-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}}.site-search__panel__title .panel-title{font-size:2rem;line-height:32px;font-weight:700;color:var(--grayscale-black);letter-spacing:-1px;margin-bottom:12px;margin-top:20px;text-transform:uppercase}@media (min-width: 30rem){.site-search__panel__title .panel-title{font-size:2.875rem;line-height:48px;letter-spacing:-1.5px;margin-top:24px}}@media (min-width: 1601px){.site-search__panel__title .panel-title{font-size:3.25rem;line-height:54px;letter-spacing:-1.6px}}.site-search__panel__title .description{font-size:0.75rem;line-height:16px;color:var(--grayscale-black);letter-spacing:-0.2px;margin-bottom:16px;padding:0}@media (min-width: 30rem){.site-search__panel__title .description{font-size:1rem;line-height:22px;letter-spacing:-0.1px;margin-bottom:18px}}@media (min-width: 60rem){.site-search__panel__title .description{font-size:1.125rem;line-height:24px;letter-spacing:-0.1px;padding-left:8px}}@media (min-width: 1601px){.site-search__panel__title .description{font-size:1.25rem;line-height:28px;letter-spacing:-0.2px;padding-left:12px}}.site-search__panel__content{background-color:#f8f8f8;width:100%}.site-search__panel__space-box{height:100%;width:100%}.site-search__panel__wrapper{margin:0 auto;max-width:100%;padding:0 1rem 2rem;width:100%}@media (min-width: 30rem){.site-search__panel__wrapper{max-width:1216px;padding:0 0 2rem}}@media (min-width: 1601px){.site-search__panel__wrapper{padding:0 0 4rem}}.site-search__panel__panel-toggle{background-color:transparent;border:none;position:absolute;right:1rem;top:25px}@media (min-width: 30rem){.site-search__panel__panel-toggle{right:2rem;top:36px}}@media (min-width: 1601px){.site-search__panel__panel-toggle{top:45px}}.site-search__panel__panel-toggle__label{font-size:0.875rem;line-height:22px;font-weight:700;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--grayscale-black);display:-webkit-box;display:-ms-flexbox;display:flex;letter-spacing:-0.44px;text-transform:uppercase}.site-search__panel__panel-toggle__label__title{padding-right:8px}@media (min-width: 1601px){.site-search__panel__panel-toggle__label{font-size:1.125rem;line-height:22px;letter-spacing:-0.56px}}.site-search__panel__panel-toggle:focus:not([disabled]),.site-search__panel__panel-toggle:hover:not([disabled]){cursor:pointer}.site-search__panel__panel-toggle:focus:not([disabled]) span,.site-search__panel__panel-toggle:hover:not([disabled]) span{color:var(--brand-main)}.site-search__panel__panel-toggle:focus:not([disabled]) svg,.site-search__panel__panel-toggle:hover:not([disabled]) svg{fill:var(--brand-main)}.site-search__panel__tools .title{font-size:1rem;line-height:20px;font-weight:700;color:var(--brand-main-nearly-black);letter-spacing:-0.5px;text-transform:uppercase}@media (min-width: 30rem){.site-search__panel__tools .title{font-size:1.125rem;line-height:24px;letter-spacing:-0.56px;margin:32px 0 16px}}.site-search__panel__tools .list a.search-special-tool{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--grayscale-white);display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:8px;text-decoration:none}.site-search__panel__tools .list a.search-special-tool .label{font-size:0.875rem;line-height:16px;font-weight:700;color:var(--brand-main-nearly-black);letter-spacing:-0.44px;padding-left:8px}@media (min-width: 30rem){.site-search__panel__tools .list a.search-special-tool .label{font-size:1rem;line-height:20px;letter-spacing:-0.5px;padding-left:12px}}.site-search__panel__tools .list a.search-special-tool .description{display:none}@media (min-width: 60rem){.site-search__panel__tools .list a.search-special-tool .description{font-size:0.875rem;line-height:18px;color:var(--grayscale-dark);display:-webkit-box;display:-ms-flexbox;display:flex;letter-spacing:-0.2px;padding-left:12px}}@media (min-width: 1601px){.site-search__panel__tools .list a.search-special-tool .description{font-size:1rem;line-height:24px;color:var(--grayscale-dark);display:-webkit-box;display:-ms-flexbox;display:flex;letter-spacing:0;padding-left:12px}}.site-search__panel__tools .list a.search-special-tool hy-icon{height:40px;width:40px}.site-search__panel__tools .list a.search-special-tool hy-icon svg{background-color:var(--brand-main-light);fill:var(--grayscale-white);height:40px;padding:8px;width:40px}";
|
|
792
793
|
|
|
793
794
|
const SiteSearch = class {
|
|
794
795
|
constructor(hostRef) {
|
|
@@ -822,20 +823,9 @@ const SiteSearch = class {
|
|
|
822
823
|
this.searchDescriptionLabel = this._searchLabels["search_description"];
|
|
823
824
|
}
|
|
824
825
|
}
|
|
825
|
-
// CLose the search panel if user opens the
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
}
|
|
829
|
-
// CLose the search panel if user opens the mobile menu panel.
|
|
830
|
-
mobileMenuToggled() {
|
|
831
|
-
this.closeSearchPanel();
|
|
832
|
-
}
|
|
833
|
-
// CLose the search panel if user opens the language menu.
|
|
834
|
-
menuLanguageToggled() {
|
|
835
|
-
this.closeSearchPanel();
|
|
836
|
-
}
|
|
837
|
-
// Close the search panel if user opens University main menu
|
|
838
|
-
universityMainMenuPanelToggled() {
|
|
826
|
+
// CLose the search panel if user opens the any other dropdown in header.
|
|
827
|
+
// Do same if user scrolls up or down;
|
|
828
|
+
closePanelWhenOtherDropdownsTriggered() {
|
|
839
829
|
this.closeSearchPanel();
|
|
840
830
|
}
|
|
841
831
|
handleWindowClick(event) {
|
|
@@ -850,11 +840,6 @@ const SiteSearch = class {
|
|
|
850
840
|
}
|
|
851
841
|
}
|
|
852
842
|
}
|
|
853
|
-
// Close the search panel on Scroll down.
|
|
854
|
-
// @Listen('headerScrollDown', {target: 'document'})
|
|
855
|
-
// headerScrollDown() {
|
|
856
|
-
// this.closeSearchPanel();
|
|
857
|
-
// }
|
|
858
843
|
closeSearchPanel() {
|
|
859
844
|
this.isSearchPanelOpen = false;
|
|
860
845
|
let cludoSayt = document.querySelectorAll("stencil-cludo-sayt")[0];
|
|
@@ -864,9 +849,11 @@ const SiteSearch = class {
|
|
|
864
849
|
CludoSayt.hide();
|
|
865
850
|
}
|
|
866
851
|
}
|
|
867
|
-
this.showBackdropShadow();
|
|
852
|
+
//this.showBackdropShadow();
|
|
868
853
|
}
|
|
869
854
|
handleSearchPanelToggle(event) {
|
|
855
|
+
// What is this??
|
|
856
|
+
// TODO: Cleanup
|
|
870
857
|
if (this.isLuomusGroup) {
|
|
871
858
|
let beta = this.isBetaGroup ? "/beta" : "";
|
|
872
859
|
let luomus_search_url = "/" + this.searchLanguage + beta + "/luomus/search-results";
|
|
@@ -886,13 +873,13 @@ const SiteSearch = class {
|
|
|
886
873
|
if (this.isSearchPanelOpen) {
|
|
887
874
|
// Close desktop menu panel and lang menu panel if they are open.
|
|
888
875
|
this.searchPanelToggled.emit();
|
|
889
|
-
this.adjustPosition(this.el);
|
|
876
|
+
//this.adjustPosition(this.el);
|
|
890
877
|
// Remove hidden class from cludo suggestions
|
|
891
878
|
let cludoSayt = document.querySelectorAll("stencil-cludo-sayt")[0];
|
|
892
879
|
if (cludoSayt) {
|
|
893
880
|
const cludoSearchContentFormElement = this.el.shadowRoot.querySelector("#cludo-search-content-form");
|
|
894
881
|
cludoSayt.classList.remove("hidden");
|
|
895
|
-
cludoSearchContentFormElement.append(cludoSayt);
|
|
882
|
+
cludoSearchContentFormElement === null || cludoSearchContentFormElement === void 0 ? void 0 : cludoSearchContentFormElement.append(cludoSayt);
|
|
896
883
|
cludoSayt.shadowRoot.querySelector("#cludo-reli-flexi-wrapper").style.position = "relative";
|
|
897
884
|
cludoSayt.shadowRoot.querySelector("#cludo-reli-flexi").style.position = "relative";
|
|
898
885
|
cludoSayt.shadowRoot.querySelector("#cludo-reli-flexi").style.maxWidth = "none";
|
|
@@ -900,7 +887,7 @@ const SiteSearch = class {
|
|
|
900
887
|
// Without setTimeout it will not focus the input because it hasn't rendered yet.
|
|
901
888
|
setTimeout(() => {
|
|
902
889
|
const searchInput = this.el.shadowRoot.querySelector("input#search");
|
|
903
|
-
searchInput.focus();
|
|
890
|
+
searchInput === null || searchInput === void 0 ? void 0 : searchInput.focus();
|
|
904
891
|
});
|
|
905
892
|
}
|
|
906
893
|
else {
|
|
@@ -909,56 +896,6 @@ const SiteSearch = class {
|
|
|
909
896
|
}
|
|
910
897
|
event.stopPropagation();
|
|
911
898
|
}
|
|
912
|
-
adjustPosition(target) {
|
|
913
|
-
let headerHeight = "0";
|
|
914
|
-
let shadowTop = 0;
|
|
915
|
-
const searchPanel = target.shadowRoot.querySelectorAll(`.site-search__panel`)[0];
|
|
916
|
-
let initialDisplayStyle = searchPanel.style.display;
|
|
917
|
-
if (this.isGroup) {
|
|
918
|
-
let hyHeader = target.closest(".hy-site-header__content-top");
|
|
919
|
-
if (hyHeader) {
|
|
920
|
-
let headerHeightValue = hyHeader.offsetHeight;
|
|
921
|
-
headerHeight = `${headerHeightValue}px`;
|
|
922
|
-
let headerTop = hyHeader.offsetTop;
|
|
923
|
-
// Add shadow backdrop
|
|
924
|
-
searchPanel.style.display = "flex";
|
|
925
|
-
shadowTop = headerHeightValue + headerTop + searchPanel.offsetHeight;
|
|
926
|
-
}
|
|
927
|
-
}
|
|
928
|
-
else {
|
|
929
|
-
let hyHeader = target.closest(".hy-site-header");
|
|
930
|
-
if (hyHeader) {
|
|
931
|
-
let headerHeightValue = hyHeader.classList.contains("hy-site-header--sticky-active")
|
|
932
|
-
? hyHeader.offsetHeight
|
|
933
|
-
: hyHeader.offsetTop + hyHeader.offsetHeight;
|
|
934
|
-
headerHeight = `${headerHeightValue}px`;
|
|
935
|
-
// Add shadow backdrop
|
|
936
|
-
searchPanel.style.display = "flex";
|
|
937
|
-
let searchPanelHeight = searchPanel.offsetHeight;
|
|
938
|
-
shadowTop = searchPanelHeight + headerHeightValue;
|
|
939
|
-
}
|
|
940
|
-
}
|
|
941
|
-
searchPanel.style.display = initialDisplayStyle;
|
|
942
|
-
searchPanel.style.top = headerHeight;
|
|
943
|
-
this.showBackdropShadow("open", shadowTop);
|
|
944
|
-
}
|
|
945
|
-
showBackdropShadow(state = "close", top = 0) {
|
|
946
|
-
let hyHeader = this.el.closest(".hy-site-header");
|
|
947
|
-
let hyBackdropDiv = hyHeader.children[0];
|
|
948
|
-
if (hyBackdropDiv) {
|
|
949
|
-
if (state === "open") {
|
|
950
|
-
let me = window.outerHeight - top;
|
|
951
|
-
hyBackdropDiv.style.height = `${me}px`;
|
|
952
|
-
hyBackdropDiv.style.top = `${top}px`;
|
|
953
|
-
hyBackdropDiv.style.position = "absolute";
|
|
954
|
-
hyBackdropDiv.classList.add("is-active");
|
|
955
|
-
}
|
|
956
|
-
else {
|
|
957
|
-
hyBackdropDiv.removeAttribute("style");
|
|
958
|
-
hyBackdropDiv.classList.remove("is-active");
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
899
|
render() {
|
|
963
900
|
const currentPageUrlPathName = window.location.pathname;
|
|
964
901
|
const searchPagePathNames = ["/fi/haku", "/en/search", "/sv/sök"];
|
|
@@ -971,15 +908,15 @@ const SiteSearch = class {
|
|
|
971
908
|
"is-open--menu": this.isAlternative,
|
|
972
909
|
"is-open": this.isSearchPanelOpen,
|
|
973
910
|
"is-active": searchPagePathNames.some((item) => item === currentPageUrlPathName),
|
|
974
|
-
}, onClick: (e) => this.handleSearchPanelToggle(e), disabled: searchPagePathNames.some((item) => item === currentPageUrlPathName) ? true : false }, this.showLabel ? (h("span", { class: { "button--search__label": true, "button--search__label__group": this.isGroup } }, this._labels["label"])) : (""), h("hy-icon", { icon: "hy-icon-search", size: this.size, fill: this.color })), !this.isLuomusGroup && (h("div", { class: {
|
|
911
|
+
}, onClick: (e) => this.handleSearchPanelToggle(e), disabled: searchPagePathNames.some((item) => item === currentPageUrlPathName) ? true : false }, this.showLabel ? (h("span", { class: { "button--search__label": true, "button--search__label__group": this.isGroup } }, this._labels["label"])) : (""), h("hy-icon", { icon: "hy-icon-search", size: this.size, fill: this.color })), (!this.isLuomusGroup && this.isSearchPanelOpen) && (h("div", { class: {
|
|
975
912
|
"site-search__panel": true,
|
|
976
913
|
"site-search__panel__is-open": this.isSearchPanelOpen,
|
|
977
|
-
}, "aria-hidden": `${!this.isSearchPanelOpen}` }, h("div", { class: "site-search__panel__wrapper" }, h("div", { class: "site-search__panel__title" }, h("div", { class: "site-search__panel__title__group" }, h("span", { class: "panel-title" }, this.searchTitleLabel), h("div", { class: "description" }, this.searchDescriptionLabel))), h("div", { id: "cludo-search-results", class: "container_12" }, h("div", { class: "search-banner" }), h("div", { class: "search-filters search-filters-mobile" }), h("div", { class: "col-md-12" }, h("div", { style: { margin: "20px 0 32px" }, id: "cludo-search-content-form" }, h("hy-search-field", { "input-id": "search", label: "" }))), h("div", { class: "col-md-3" }, h("div", { class: "search-filters", "aria-controls": "search-results" })), h("div", { class: "col-md-9" }, h("div", { class: "search-results-container" }, h("hy-paragraph-text", null, h("div", { class: "search-result-count" })), h("div", { class: "search-did-you-mean", role: "Complementary" }), h("div", { class: "search-results", role: "region", id: "search-results", "aria-live": "polite" })))), this._searchTools && this._searchTools.length > 0 && (h("div", { class: "site-search__panel__tools" }, h("div", { class: "title" }, this.searchToolsLabel), h("div", { class: "list" }, this._searchTools.map((i) => {
|
|
914
|
+
}, "aria-hidden": `${!this.isSearchPanelOpen}` }, h("div", { class: "site-search__panel__content" }, h("div", { class: "site-search__panel__wrapper" }, h("div", { class: "site-search__panel__title" }, h("div", { class: "site-search__panel__title__group" }, h("span", { class: "panel-title" }, this.searchTitleLabel), h("div", { class: "description" }, this.searchDescriptionLabel))), h("div", { id: "cludo-search-results", class: "container_12" }, h("div", { class: "search-banner" }), h("div", { class: "search-filters search-filters-mobile" }), h("div", { class: "col-md-12" }, h("div", { style: { margin: "20px 0 32px" }, id: "cludo-search-content-form" }, h("hy-search-field", { "input-id": "search", label: "" }))), h("div", { class: "col-md-3" }, h("div", { class: "search-filters", "aria-controls": "search-results" })), h("div", { class: "col-md-9" }, h("div", { class: "search-results-container" }, h("hy-paragraph-text", null, h("div", { class: "search-result-count" })), h("div", { class: "search-did-you-mean", role: "Complementary" }), h("div", { class: "search-results", role: "region", id: "search-results", "aria-live": "polite" })))), this._searchTools && this._searchTools.length > 0 && (h("div", { class: "site-search__panel__tools" }, h("div", { class: "title" }, this.searchToolsLabel), h("div", { class: "list" }, this._searchTools.map((i) => {
|
|
978
915
|
let searchToolTarget = i.isExternal ? "_blank" : "_self";
|
|
979
916
|
return (h("a", { class: "search-special-tool", href: i.url, target: searchToolTarget }, h("hy-icon", { icon: "hy-icon-arrow-to-right", size: 14, fill: ColorVariant.black }), h("span", { class: "label" }, i.label), h("span", { class: "description" }, i.description)));
|
|
980
917
|
})))), h("button", { onClick: () => this.closeSearchPanel(), class: {
|
|
981
918
|
"site-search__panel__panel-toggle": true,
|
|
982
|
-
}, "aria-label": this.searchCloseLabel, "aria-expanded": `${this.isSearchPanelOpen}` }, h("span", { class: "site-search__panel__panel-toggle__label" }, h("span", { class: "site-search__panel__panel-toggle__label__title", tabindex: "0" }, this.searchCloseLabel), h("hy-icon", { icon: "hy-icon-remove", size: 16, fill: ColorVariant.black }))))))));
|
|
919
|
+
}, "aria-label": this.searchCloseLabel, "aria-expanded": `${this.isSearchPanelOpen}` }, h("span", { class: "site-search__panel__panel-toggle__label" }, h("span", { class: "site-search__panel__panel-toggle__label__title", tabindex: "0" }, this.searchCloseLabel), h("hy-icon", { icon: "hy-icon-remove", size: 16, fill: ColorVariant.black })))), h("div", { class: "site-search__panel__space-box", onClick: () => this.closeSearchPanel() }))))));
|
|
983
920
|
}
|
|
984
921
|
get el() { return getElement(this); }
|
|
985
922
|
};
|