@itcenteratunihelsinki/huds-lib 0.5.21 → 0.5.25

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 (70) hide show
  1. package/dist/cjs/huds-lib.cjs.js +1 -1
  2. package/dist/cjs/hy-accordion-container_5.cjs.entry.js +578 -0
  3. package/dist/cjs/hy-desktop-menu-links.cjs.entry.js +4 -3
  4. package/dist/cjs/hy-list-item.cjs.entry.js +1 -1
  5. package/dist/cjs/{hy-menu-language_2.cjs.entry.js → hy-menu-language.cjs.entry.js} +0 -19
  6. package/dist/cjs/hy-menu-mobile-breadcrumb.cjs.entry.js +25 -0
  7. package/dist/cjs/hy-menu.cjs.entry.js +4 -8
  8. package/dist/cjs/hy-paragraph-text.cjs.entry.js +1 -1
  9. package/dist/cjs/hy-person-profile.cjs.entry.js +61 -0
  10. package/dist/cjs/hy-site-header_3.cjs.entry.js +14 -6
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/collection/collection-manifest.json +2 -0
  13. package/dist/collection/components/accordion-item/accordion-item.css +5 -4
  14. package/dist/collection/components/accordion-item/accordion-item.js +20 -20
  15. package/dist/collection/components/hy-list-item/hy-list-item.css +9 -4
  16. package/dist/collection/components/navigation/menu/menu.js +21 -10
  17. package/dist/collection/components/paragraph-text/paragraph-text.css +9 -7
  18. package/dist/collection/components/person-profile/person-profile-listing/person-profile-listing.css +188 -0
  19. package/dist/collection/components/person-profile/person-profile-listing/person-profile.listing.js +124 -0
  20. package/dist/collection/components/person-profile/person-profile.css +506 -0
  21. package/dist/collection/components/person-profile/person-profile.js +199 -0
  22. package/dist/collection/components/site-header/hy-desktop-menu-links/hy-desktop-menu-links.css +20 -10
  23. package/dist/collection/components/site-header/hy-desktop-menu-links/hy-desktop-menu-links.js +3 -2
  24. package/dist/collection/components/site-header/site-header.css +12 -0
  25. package/dist/collection/components/site-header/site-header.js +21 -2
  26. package/dist/collection/components/site-header/site-logo/site-logo.css +22 -0
  27. package/dist/collection/components/site-header/site-search/site-search.css +10 -10
  28. package/dist/collection/components/site-header/site-search/site-search.js +8 -1
  29. package/dist/esm/huds-lib.js +1 -1
  30. package/dist/esm/hy-accordion-container_5.entry.js +570 -0
  31. package/dist/esm/hy-desktop-menu-links.entry.js +4 -3
  32. package/dist/esm/hy-list-item.entry.js +1 -1
  33. package/dist/esm/{hy-menu-language_2.entry.js → hy-menu-language.entry.js} +1 -19
  34. package/dist/esm/hy-menu-mobile-breadcrumb.entry.js +21 -0
  35. package/dist/esm/hy-menu.entry.js +4 -8
  36. package/dist/esm/hy-paragraph-text.entry.js +1 -1
  37. package/dist/esm/hy-person-profile.entry.js +57 -0
  38. package/dist/esm/hy-site-header_3.entry.js +14 -6
  39. package/dist/esm/loader.js +1 -1
  40. package/dist/huds-lib/huds-lib.esm.js +1 -1
  41. package/dist/huds-lib/p-0b2e3057.entry.js +1 -0
  42. package/dist/huds-lib/p-22e9d015.entry.js +1 -0
  43. package/dist/huds-lib/p-3d35d226.entry.js +1 -0
  44. package/dist/huds-lib/{p-b526249a.entry.js → p-4252e76e.entry.js} +1 -1
  45. package/dist/huds-lib/{p-bf84b857.entry.js → p-557d5e62.entry.js} +1 -1
  46. package/dist/huds-lib/{p-401ead3c.entry.js → p-70d43477.entry.js} +1 -1
  47. package/dist/huds-lib/p-8f62c5a4.entry.js +1 -0
  48. package/dist/huds-lib/p-ac362729.entry.js +1 -0
  49. package/dist/huds-lib/p-c3afba74.entry.js +1 -0
  50. package/dist/types/components/navigation/menu/menu.d.ts +2 -1
  51. package/dist/types/components/person-profile/person-profile-listing/person-profile.listing.d.ts +14 -0
  52. package/dist/types/components/person-profile/person-profile.d.ts +12 -0
  53. package/dist/types/components/site-header/site-header.d.ts +1 -0
  54. package/dist/types/components.d.ts +51 -0
  55. package/package.json +1 -1
  56. package/dist/cjs/hy-accordion-container.cjs.entry.js +0 -29
  57. package/dist/cjs/hy-accordion-item.cjs.entry.js +0 -216
  58. package/dist/cjs/hy-tabs-item.cjs.entry.js +0 -20
  59. package/dist/cjs/hy-tabs.cjs.entry.js +0 -308
  60. package/dist/esm/hy-accordion-container.entry.js +0 -25
  61. package/dist/esm/hy-accordion-item.entry.js +0 -212
  62. package/dist/esm/hy-tabs-item.entry.js +0 -16
  63. package/dist/esm/hy-tabs.entry.js +0 -304
  64. package/dist/huds-lib/p-0a3ee940.entry.js +0 -1
  65. package/dist/huds-lib/p-63334950.entry.js +0 -1
  66. package/dist/huds-lib/p-85cad30d.entry.js +0 -1
  67. package/dist/huds-lib/p-8eb879d5.entry.js +0 -1
  68. package/dist/huds-lib/p-9c2f38a6.entry.js +0 -1
  69. package/dist/huds-lib/p-d4a8d85f.entry.js +0 -1
  70. package/dist/huds-lib/p-df368663.entry.js +0 -1
@@ -0,0 +1,199 @@
1
+ import { Component, Host, h, Prop, State, Fragment } from '@stencil/core';
2
+ export class PersonProfile {
3
+ constructor() {
4
+ this.isFullAboutTextHidden = false;
5
+ }
6
+ componentWillLoad() {
7
+ this.viewportSize = window.innerWidth;
8
+ }
9
+ toggleShowFullAboutText() {
10
+ this.isFullAboutTextHidden = !this.isFullAboutTextHidden;
11
+ }
12
+ render() {
13
+ const { name, job_title, additional_information, image_url, contact_information, organization_units, about, research, person_content, } = JSON.parse(this.personDataJson);
14
+ const { organizations, research_organizations } = organization_units.items;
15
+ const aboutDescriptionTextDestructured = about.description
16
+ .split('\n')
17
+ .filter((n) => n)
18
+ .map((item) => item.replace(/(<([^>]+)>)/gi, ''));
19
+ const aboutDescriptionLength = aboutDescriptionTextDestructured.join(' ').length;
20
+ let trimmedAboutDescription = '';
21
+ if (aboutDescriptionLength > 650) {
22
+ if (this.isFullAboutTextHidden) {
23
+ const ellipsisTextArray = (aboutDescriptionTextDestructured.join('\n') + '...').split('\n');
24
+ trimmedAboutDescription = ellipsisTextArray
25
+ .map((item) => {
26
+ return `<p>${item}</p>`;
27
+ })
28
+ .join('');
29
+ }
30
+ else {
31
+ const ellipsisTextArray = (aboutDescriptionTextDestructured.join('\n').substring(0, 647) + '...').split('\n');
32
+ trimmedAboutDescription = ellipsisTextArray
33
+ .map((item) => {
34
+ return `<p>${item}</p>`;
35
+ })
36
+ .join('');
37
+ }
38
+ }
39
+ window.addEventListener('resize', () => {
40
+ this.viewportSize = window.innerWidth;
41
+ });
42
+ return (h(Host, null,
43
+ h("section", { class: "hy-profile-page" },
44
+ h("a", { href: this.peopleFinderReturnLink, class: "hy-profile-page__back-button" },
45
+ h("hy-icon", { icon: 'hy-icon-arrow-left', size: 24 }),
46
+ h("span", null, "Back to people finder")),
47
+ h("section", { class: "hy-profile-page__section" },
48
+ h("div", { class: "hy-profile-page__person-information" },
49
+ h("div", null,
50
+ h("h1", { class: "hy-profile-page__name" }, name),
51
+ job_title && h("p", { class: "hy-profile-page__job-title" }, job_title),
52
+ additional_information && (h("p", { class: "hy-profile-page__additional-information" }, additional_information))),
53
+ image_url ? (h("img", { src: image_url, alt: "", class: "hy-profile-page__image" })) : (h("div", { class: "hy-profile-page__image", "aria-hidden": "true" }))),
54
+ contact_information && (h("div", { class: "hy-profile-page__contact-information" },
55
+ contact_information.label && h("h2", null, contact_information.label),
56
+ contact_information.items && (h("hy-person-profile-listing", { items: contact_information.items, col: "col-4", withoutIcons: true, textSpacingTight: true }))))),
57
+ (organizations.items.length > 0 || Object.keys(research_organizations.items).length > 0) && (h("section", { class: "hy-profile-page__section" },
58
+ organization_units.label && h("h2", null, organization_units.label),
59
+ organizations.items.length > 0 && (h("section", { class: "hy-profile-page__organization-units-section" },
60
+ h("h3", null, organizations.label),
61
+ h("ul", { class: "hy-profile-page__organizations" },
62
+ h("li", null, organizations.items.map(({ name }, index) => {
63
+ return (h("span", null,
64
+ index !== 0 && h("hy-icon", { icon: 'hy-icon-caret-right', size: 10 }),
65
+ h("span", null, name[organization_units.lang])));
66
+ }))))),
67
+ Object.keys(research_organizations.items).length > 0 && (h("section", { class: "hy-profile-page__organization-units-section" },
68
+ h("h3", null, research_organizations.label),
69
+ h("ul", { class: "hy-profile-page__research-organizations" }, Object.values(research_organizations.items).map(([...item]) => (h("li", null, item.map(({ name }, index) => {
70
+ return (h(Fragment, null, index !== 0 ? (h("ul", null,
71
+ h("li", null,
72
+ h("span", null,
73
+ h("hy-icon", { icon: 'hy-icon-caret-right', size: 10 }),
74
+ h("span", null, name[organization_units.lang]))))) : (h("span", null, name[organization_units.lang]))));
75
+ }))))))))),
76
+ about && aboutDescriptionLength !== 0 && (h("section", { class: "hy-profile-page__section" },
77
+ h("h2", null, about.label),
78
+ about.description && (h("div", { class: "hy-profile-page__person-about-text", innerHTML: !this.isFullAboutTextHidden && aboutDescriptionLength > 650
79
+ ? trimmedAboutDescription
80
+ : about.description })),
81
+ aboutDescriptionLength > 650 && (h("button", { class: "hy-profile-page__person-about-text-toggle", onClick: () => this.toggleShowFullAboutText(), "aria-expanded": `${this.isFullAboutTextHidden ? 'true' : 'false'}` }, this.isFullAboutTextHidden ? this.hideFullAboutText : this.showFullAboutText)))),
82
+ (research || person_content) && (h("section", { class: "hy-profile-page__section" },
83
+ research.label && h("h2", null, research.label),
84
+ research.items && (h("hy-person-profile-listing", { items: research.items, col: "col-1", inline: true })),
85
+ h("div", { class: "hy-profile-page__loader", role: "presentation" },
86
+ h("div", null),
87
+ h("div", null),
88
+ h("div", null),
89
+ h("div", null)),
90
+ this.viewportSize < 768 ? (h("div", { class: "hy-profile-page__person-content-container" },
91
+ h("hy-accordion-container", { accordionid: "accordion-container-person-content" },
92
+ person_content.publications && (h("hy-accordion-item", { accordiontitle: person_content.publications.label })),
93
+ person_content.projects && (h("hy-accordion-item", { accordiontitle: person_content.projects.label })),
94
+ person_content.activities && (h("hy-accordion-item", { accordiontitle: person_content.activities.label }))))) : (h("div", { class: "hy-profile-page__person-content-container" },
95
+ h("hy-tabs", { "tab-id": "tabs-container-person-content" },
96
+ person_content.publications && (h("hy-tabs-item", { "tab-title": person_content.publications.label })),
97
+ person_content.projects && h("hy-tabs-item", { "tab-title": person_content.projects.label }),
98
+ person_content.activities && (h("hy-tabs-item", { "tab-title": person_content.activities.label }))))))))));
99
+ }
100
+ static get is() { return "hy-person-profile"; }
101
+ static get encapsulation() { return "shadow"; }
102
+ static get originalStyleUrls() { return {
103
+ "$": ["person-profile.scss"]
104
+ }; }
105
+ static get styleUrls() { return {
106
+ "$": ["person-profile.css"]
107
+ }; }
108
+ static get properties() { return {
109
+ "personDataJson": {
110
+ "type": "string",
111
+ "mutable": false,
112
+ "complexType": {
113
+ "original": "string",
114
+ "resolved": "string",
115
+ "references": {}
116
+ },
117
+ "required": false,
118
+ "optional": false,
119
+ "docs": {
120
+ "tags": [],
121
+ "text": ""
122
+ },
123
+ "attribute": "person-data-json",
124
+ "reflect": false
125
+ },
126
+ "showFullAboutText": {
127
+ "type": "string",
128
+ "mutable": false,
129
+ "complexType": {
130
+ "original": "string",
131
+ "resolved": "string",
132
+ "references": {}
133
+ },
134
+ "required": false,
135
+ "optional": false,
136
+ "docs": {
137
+ "tags": [],
138
+ "text": ""
139
+ },
140
+ "attribute": "show-full-about-text",
141
+ "reflect": false
142
+ },
143
+ "hideFullAboutText": {
144
+ "type": "string",
145
+ "mutable": false,
146
+ "complexType": {
147
+ "original": "string",
148
+ "resolved": "string",
149
+ "references": {}
150
+ },
151
+ "required": false,
152
+ "optional": false,
153
+ "docs": {
154
+ "tags": [],
155
+ "text": ""
156
+ },
157
+ "attribute": "hide-full-about-text",
158
+ "reflect": false
159
+ },
160
+ "organizationItemsLabelText": {
161
+ "type": "string",
162
+ "mutable": false,
163
+ "complexType": {
164
+ "original": "string",
165
+ "resolved": "string",
166
+ "references": {}
167
+ },
168
+ "required": false,
169
+ "optional": false,
170
+ "docs": {
171
+ "tags": [],
172
+ "text": ""
173
+ },
174
+ "attribute": "organization-items-label-text",
175
+ "reflect": false
176
+ },
177
+ "peopleFinderReturnLink": {
178
+ "type": "string",
179
+ "mutable": false,
180
+ "complexType": {
181
+ "original": "string",
182
+ "resolved": "string",
183
+ "references": {}
184
+ },
185
+ "required": false,
186
+ "optional": false,
187
+ "docs": {
188
+ "tags": [],
189
+ "text": ""
190
+ },
191
+ "attribute": "people-finder-return-link",
192
+ "reflect": false
193
+ }
194
+ }; }
195
+ static get states() { return {
196
+ "isFullAboutTextHidden": {},
197
+ "viewportSize": {}
198
+ }; }
199
+ }
@@ -101,9 +101,6 @@
101
101
  font-size: 0.875rem;
102
102
  line-height: 16px;
103
103
  font-weight: 700;
104
- -webkit-box-align: center;
105
- -ms-flex-align: center;
106
- align-items: center;
107
104
  background-color: transparent;
108
105
  border: none;
109
106
  color: var(--brand-main-nearly-black);
@@ -117,27 +114,40 @@
117
114
  flex-direction: row;
118
115
  font-family: var(--main-font-family);
119
116
  height: 100%;
120
- -webkit-box-pack: center;
121
- -ms-flex-pack: center;
122
- justify-content: center;
123
117
  letter-spacing: -0.7px;
124
- padding: 26px 10px;
118
+ padding: 39px 10px 13px;
125
119
  text-transform: uppercase;
126
- width: -webkit-min-content;
127
- width: -moz-min-content;
128
- width: min-content;
129
120
  text-decoration: none;
121
+ text-align: left;
130
122
  }
131
123
 
132
124
  .is-group .hy-desktop-menu__button {
125
+ padding: 26px 10px;
133
126
  width: auto;
134
127
  }
135
128
 
129
+ .hy-desktop-menu__button.is-long > span {
130
+ max-width: 116px;
131
+ }
132
+
133
+ @media (min-width: 1601px) {
134
+ .hy-desktop-menu__button.is-long > span {
135
+ max-width: none;
136
+ }
137
+ }
138
+
136
139
  @media (min-width: 1601px) {
137
140
  .hy-desktop-menu__button {
138
141
  font-size: 1rem;
139
142
  line-height: 16px;
140
143
  width: auto;
144
+ -webkit-box-align: center;
145
+ -ms-flex-align: center;
146
+ align-items: center;
147
+ -webkit-box-pack: center;
148
+ -ms-flex-pack: center;
149
+ justify-content: center;
150
+ padding: 26px 10px;
141
151
  }
142
152
  }
143
153
 
@@ -285,13 +285,14 @@ export class HyDesktopMenuLinks {
285
285
  if (links) {
286
286
  links.map(({ menuLinkId: id, shortcuts, items, url, description, toggleOff, label, labelExtra, isExternal, isActive, shortcutsTitle, closeButtonTitle, }) => {
287
287
  let target = isExternal ? '_blank' : '_self';
288
+ const isLabelLong = label.split(' ').length - 1 >= 2 ? true : false;
288
289
  if (toggleOff) {
289
290
  menuLinkItems.push(h("li", { onMouseEnter: (e) => this.handleDesktopMenuClose(e), class: `hy-desktop-menu__item ${isActive === 'true' ? 'is-active-trail' : ''}` },
290
- h("a", { "aria-current": label, href: url, target: target, class: "hy-desktop-menu__button", "menu-link-id": id }, labelExtra ? h("span", { class: "label" }, labelExtra) : h("span", { class: "label" }, label))));
291
+ h("a", { "aria-current": label, href: url, target: target, class: `hy-desktop-menu__button ${isLabelLong && !this.isGroup ? 'is-long' : ''}`, "menu-link-id": id }, labelExtra ? h("span", { class: "label" }, labelExtra) : h("span", { class: "label" }, label))));
291
292
  }
292
293
  else {
293
294
  menuLinkItems.push(h("li", { class: "hy-desktop-menu__item" },
294
- h("button", { tabindex: "0", type: "button", class: `hy-desktop-menu__button ${isActive === 'true' ? 'is-active-trail' : ''}`, "link-id": id, onClick: (e) => this.handleDesktopMenuClick(e, id), onKeyDown: (e) => this.handleKeyDown(e, id), onMouseEnter: (e) => this.handleDesktopMenuEnter(e, id), onMouseLeave: () => this.handleDesktopMenuLeave(), "aria-expanded": "false" },
295
+ h("button", { tabindex: "0", type: "button", class: `hy-desktop-menu__button ${isActive === 'true' ? 'is-active-trail' : ''} ${isLabelLong && !this.isGroup ? 'is-long' : ''}`, "link-id": id, onClick: (e) => this.handleDesktopMenuClick(e, id), onKeyDown: (e) => this.handleKeyDown(e, id), onMouseEnter: (e) => this.handleDesktopMenuEnter(e, id), onMouseLeave: () => this.handleDesktopMenuLeave(), "aria-expanded": "false" },
295
296
  h("span", null, label),
296
297
  h("hy-icon", { icon: 'hy-icon-caret-down', size: 32 })),
297
298
  h("section", { class: `hy-desktop-menu__panel ${this.isDropdown ? 'is-dropdown' : ''}`, "aria-hidden": "true" },
@@ -212,6 +212,18 @@
212
212
  }
213
213
  }
214
214
 
215
+ .hy-site-header__branding > a img {
216
+ height: 100%;
217
+ max-height: 48px;
218
+ }
219
+
220
+ @media (min-width: 75.0625rem) {
221
+ .hy-site-header__branding > a img {
222
+ -webkit-transform: translateY(-10px);
223
+ transform: translateY(-10px);
224
+ }
225
+ }
226
+
215
227
  @media (min-width: 75.0625rem) {
216
228
  .is-group:not(.is-research-group) > .hy-site-header__branding {
217
229
  margin-right: 42px;
@@ -7,6 +7,7 @@ export class SiteHeader {
7
7
  this.isGroup = false;
8
8
  this.researchGroupLabel = '';
9
9
  this.groupType = '';
10
+ this.groupLogoUrl = '';
10
11
  this.showSearchLabel = true;
11
12
  this.noSearch = false;
12
13
  this.menuLabel = 'Menu';
@@ -200,7 +201,7 @@ export class SiteHeader {
200
201
  h("section", { class: `hy-site-header__container ${this.isGroup ? 'is-group' : ''} ${this.groupType === 'research_group_menu' ? 'is-research-group' : ''}` },
201
202
  h("div", { class: 'hy-site-header__branding' },
202
203
  this.isGroup && this.groupType == 'research_group_menu' && h("p", null, this.researchGroupLabel),
203
- this.isGroup ? (h("a", { href: this.logoUrl }, this.logoLabel)) : (h("hy-site-logo", { size: logoSize, color: logoColor, url: this.logoUrl, label: this.logoLabel }))),
204
+ this.isGroup ? (h("a", { href: this.logoUrl }, this.groupType == 'generic_site_group_menu' && this.groupLogoUrl ? (h("img", { src: this.groupLogoUrl, alt: `${this.logoLabel} logo` })) : (this.logoLabel))) : (h("hy-site-logo", { size: logoSize, color: logoColor, url: this.logoUrl, label: this.logoLabel }))),
204
205
  this.groupType != 'research_group_menu' && (h("hy-desktop-menu-links", { "data-desktop-links": this.dataDesktopLinks, isGroup: this.isGroup, isDropdown: this.isDesktopMenuDropdown })),
205
206
  !this.isGroup && (h("div", { class: "hy-site-header__actions" },
206
207
  h("hy-menu-language", { "data-menu-language": this.dataMenuLanguage, labels: this.languageLabels }),
@@ -227,7 +228,7 @@ export class SiteHeader {
227
228
  h("section", { class: "hy-site-header__container" },
228
229
  h("div", { class: 'hy-site-header__branding' },
229
230
  this.groupType == 'research_group_menu' && h("p", null, this.researchGroupLabel),
230
- this.isGroup ? (h("a", { href: this.logoUrl }, this.logoLabel)) : (h("hy-site-logo", { size: logoSize, color: logoColor, url: this.logoUrl, label: this.logoLabel }))),
231
+ this.isGroup ? (h("a", { href: this.logoUrl }, this.groupType == 'generic_site_group_menu' && this.groupLogoUrl ? (h("img", { src: this.groupLogoUrl, alt: `${this.logoLabel} logo` })) : (this.logoLabel))) : (h("hy-site-logo", { size: logoSize, color: logoColor, url: this.logoUrl, label: this.logoLabel }))),
231
232
  h("div", { class: "hy-site-header__actions" },
232
233
  !this.isGroup && (h("hy-menu-language", { "data-menu-language": this.dataMenuLanguage, labels: this.languageLabels })),
233
234
  !this.isGroup && !this.noSearch && (h("hy-site-search", { size: 24, color: ColorVariant.black, "show-label": this.showSearchLabel, labels: this.searchLabels, "search-labels": this.dataSiteSearchLabels, "search-tools": this.dataSearchTools })),
@@ -306,6 +307,24 @@ export class SiteHeader {
306
307
  "reflect": false,
307
308
  "defaultValue": "''"
308
309
  },
310
+ "groupLogoUrl": {
311
+ "type": "string",
312
+ "mutable": false,
313
+ "complexType": {
314
+ "original": "string",
315
+ "resolved": "string",
316
+ "references": {}
317
+ },
318
+ "required": false,
319
+ "optional": false,
320
+ "docs": {
321
+ "tags": [],
322
+ "text": ""
323
+ },
324
+ "attribute": "group-logo-url",
325
+ "reflect": false,
326
+ "defaultValue": "''"
327
+ },
309
328
  "dataMenuLanguage": {
310
329
  "type": "string",
311
330
  "mutable": false,
@@ -103,6 +103,28 @@
103
103
  }
104
104
  }
105
105
 
106
+ @media (min-width: 75.0625rem) {
107
+ .hy-site-header__branding .hy-site-logo__label {
108
+ min-width: -webkit-min-content;
109
+ min-width: -moz-min-content;
110
+ min-width: min-content;
111
+ max-width: 90px;
112
+ white-space: initial;
113
+ }
114
+ }
115
+
116
+ @media (min-width: 1601px) {
117
+ .hy-site-header__branding .hy-site-logo__label {
118
+ min-width: -webkit-min-content;
119
+ min-width: -moz-min-content;
120
+ min-width: min-content;
121
+ max-width: -webkit-max-content;
122
+ max-width: -moz-max-content;
123
+ max-width: max-content;
124
+ white-space: nowrap;
125
+ }
126
+ }
127
+
106
128
  @media (min-width: 30rem) {
107
129
  .hy-site-logo__label {
108
130
  font-size: 0.9375rem;
@@ -98,25 +98,25 @@
98
98
  }
99
99
  }
100
100
 
101
- .button--search:hover {
101
+ .button--search:hover:not([disabled]) {
102
102
  color: var(--brand-main);
103
103
  cursor: pointer;
104
104
  }
105
105
 
106
- .button--search:hover svg {
106
+ .button--search:hover:not([disabled]) svg {
107
107
  fill: var(--brand-main);
108
108
  }
109
109
 
110
- .button--search:focus {
110
+ .button--search:focus:not([disabled]) {
111
111
  outline: solid 2px var(--additional-yellow);
112
112
  outline-offset: 2px;
113
113
  }
114
114
 
115
- .button--search[aria-expanded=true] {
115
+ .button--search.is-active, .button--search[aria-expanded=true] {
116
116
  position: relative;
117
117
  }
118
118
 
119
- .button--search[aria-expanded=true]:after {
119
+ .button--search.is-active:after, .button--search[aria-expanded=true]:after {
120
120
  content: "";
121
121
  position: absolute;
122
122
  height: 4px;
@@ -130,12 +130,12 @@
130
130
  color: var(--grayscale-white);
131
131
  }
132
132
 
133
- .is-group .button--search:hover {
133
+ .is-group .button--search:hover:not([disabled]) {
134
134
  color: var(--grayscale-medium);
135
135
  cursor: pointer;
136
136
  }
137
137
 
138
- .is-group .button--search:hover svg {
138
+ .is-group .button--search:hover:not([disabled]) svg {
139
139
  fill: var(--grayscale-medium);
140
140
  }
141
141
 
@@ -346,15 +346,15 @@
346
346
  }
347
347
  }
348
348
 
349
- .site-search__panel__panel-toggle:focus, .site-search__panel__panel-toggle:hover {
349
+ .site-search__panel__panel-toggle:focus:not([disabled]), .site-search__panel__panel-toggle:hover:not([disabled]) {
350
350
  cursor: pointer;
351
351
  }
352
352
 
353
- .site-search__panel__panel-toggle:focus span, .site-search__panel__panel-toggle:hover span {
353
+ .site-search__panel__panel-toggle:focus:not([disabled]) span, .site-search__panel__panel-toggle:hover:not([disabled]) span {
354
354
  color: var(--brand-main);
355
355
  }
356
356
 
357
- .site-search__panel__panel-toggle:focus svg, .site-search__panel__panel-toggle:hover svg {
357
+ .site-search__panel__panel-toggle:focus:not([disabled]) svg, .site-search__panel__panel-toggle:hover:not([disabled]) svg {
358
358
  fill: var(--brand-main);
359
359
  }
360
360
 
@@ -64,7 +64,11 @@ export class SiteSearch {
64
64
  // Remove hidden class from cludo suggestions
65
65
  let cludoSayt = document.querySelectorAll('stencil-cludo-sayt')[0];
66
66
  if (cludoSayt) {
67
+ const cludoSearchContentFormElement = this.el.shadowRoot.querySelector('#cludo-search-content-form');
67
68
  cludoSayt.classList.remove('hidden');
69
+ cludoSearchContentFormElement.append(cludoSayt);
70
+ cludoSayt.shadowRoot.querySelector('#cludo-reli-flexi-wrapper').style.position = 'relative';
71
+ cludoSayt.shadowRoot.querySelector('#cludo-reli-flexi').style.position = 'relative';
68
72
  }
69
73
  // Without setTimeout it will not focus the input because it hasn't rendered yet.
70
74
  setTimeout(() => {
@@ -128,6 +132,8 @@ export class SiteSearch {
128
132
  }
129
133
  }
130
134
  render() {
135
+ const currentPageUrlPathName = window.location.pathname;
136
+ const searchPagePathNames = ['/fi/haku', '/en/search', '/sv/sök'];
131
137
  return (h("div", { class: {
132
138
  'site-search': true,
133
139
  'site-search__is-open': this.isSearchPanelOpen,
@@ -137,7 +143,8 @@ export class SiteSearch {
137
143
  'button--search': true,
138
144
  'is-open--menu': this.isAlternative,
139
145
  'is-open': this.isSearchPanelOpen,
140
- }, onClick: (e) => this.handleSearchPanelToggle(e) },
146
+ 'is-active': searchPagePathNames.some((item) => item === currentPageUrlPathName),
147
+ }, onClick: (e) => this.handleSearchPanelToggle(e), disabled: searchPagePathNames.some((item) => item === currentPageUrlPathName) ? true : false },
141
148
  this.showLabel ? (h("span", { class: { 'button--search__label': true, 'button--search__label__group': this.isGroup } }, this._labels['label'])) : (''),
142
149
  h("hy-icon", { icon: 'hy-icon-search', size: this.size, fill: this.color })),
143
150
  h("div", { class: {