@itcenteratunihelsinki/huds-lib 0.9.8 → 0.10.0
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-hero-carousel.js +5 -7
- package/components/hy-hero.js +3 -1
- package/components/hy-ingress.js +1 -1
- package/components/image.js +14 -8
- package/components/site-search.js +10 -7
- package/dist/cjs/huds-lib.cjs.js +1 -1
- package/dist/cjs/hy-breadcrumbs_15.cjs.entry.js +11 -8
- package/dist/cjs/hy-hero-carousel.cjs.entry.js +5 -7
- package/dist/cjs/hy-hero.cjs.entry.js +2 -1
- package/dist/cjs/hy-image.cjs.entry.js +13 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/hy-hero/hy-hero.js +20 -1
- package/dist/collection/components/hy-hero-carousel/hy-hero-carousel.js +5 -7
- package/dist/collection/components/hy-image/image.js +34 -11
- package/dist/collection/components/hy-ingress/ingress.css +4 -36
- package/dist/collection/components/hy-site-header/site-search/site-search.css +320 -0
- package/dist/collection/components/hy-site-header/site-search/site-search.js +9 -6
- package/dist/esm/huds-lib.js +1 -1
- package/dist/esm/hy-breadcrumbs_15.entry.js +11 -8
- package/dist/esm/hy-hero-carousel.entry.js +5 -7
- package/dist/esm/hy-hero.entry.js +2 -1
- package/dist/esm/hy-image.entry.js +13 -8
- package/dist/esm/loader.js +1 -1
- package/dist/huds-lib/huds-lib.esm.js +1 -1
- package/dist/huds-lib/hy-breadcrumbs_15.entry.js +1 -1
- package/dist/huds-lib/hy-hero-carousel.entry.js +1 -1
- package/dist/huds-lib/hy-hero.entry.js +1 -1
- package/dist/huds-lib/hy-image.entry.js +1 -1
- package/dist/types/components/hy-hero/hy-hero.d.ts +1 -0
- package/dist/types/components/hy-hero-carousel/hy-hero-carousel.d.ts +1 -0
- package/dist/types/components/hy-image/image.d.ts +1 -0
- package/dist/types/components/hy-site-header/site-search/site-search.d.ts +1 -0
- package/dist/types/components.d.ts +4 -0
- package/package.json +2 -2
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export class Image {
|
|
3
3
|
constructor() {
|
|
4
|
-
this.imageUrl =
|
|
5
|
-
this.imageAlt =
|
|
4
|
+
this.imageUrl = "";
|
|
5
|
+
this.imageAlt = "";
|
|
6
6
|
this.disableLazy = false;
|
|
7
|
-
this.fetchPriority =
|
|
7
|
+
this.fetchPriority = "auto";
|
|
8
8
|
this.caption = null;
|
|
9
9
|
this.aspectRatioWidth = 16;
|
|
10
10
|
this.aspectRatioHeight = 9;
|
|
11
|
+
this.imageDecorative = false;
|
|
11
12
|
this.sourceSet = undefined;
|
|
12
13
|
}
|
|
13
14
|
srcSetWatcher(data) {
|
|
@@ -29,15 +30,19 @@ export class Image {
|
|
|
29
30
|
"--aspectRatio": `${aspect}%`,
|
|
30
31
|
};
|
|
31
32
|
}
|
|
32
|
-
const classAttributes = ["hy-image", this.caption && this.caption.length > 0 ? "hy-image--with-caption" : null]
|
|
33
|
+
const classAttributes = ["hy-image", this.caption && this.caption.length > 0 ? "hy-image--with-caption" : null]
|
|
34
|
+
.filter(Boolean)
|
|
35
|
+
.join(" ");
|
|
33
36
|
const containerClasses = [
|
|
34
37
|
"hy-image__image-container",
|
|
35
38
|
aspectRatio !== null ? "hy-image--with-aspect" : "hy-image--no-aspect",
|
|
36
|
-
]
|
|
39
|
+
]
|
|
40
|
+
.filter(Boolean)
|
|
41
|
+
.join(" ");
|
|
37
42
|
return [
|
|
38
|
-
h("div", { key: '
|
|
39
|
-
(this._sourceSet ? (h("picture", null, this._sourceSet.map(({ src, media, type, sizes }) => (h("source", { srcSet: src, media: media, type: type, sizes: sizes || "" }))), h("img", { "fetch-priority": this.fetchPriority, loading: this.disableLazy ? "eager" : "lazy", alt: this.imageAlt, class: "hy-image__image", src: this.imageUrl }))) : (h("img", { "fetch-priority": this.fetchPriority, loading: this.disableLazy ? "eager" : "lazy", alt: this.imageAlt, class: "hy-image__image", src: this.imageUrl })))), this.caption && h("div", { key: '
|
|
40
|
-
h("hy-box", { key: '
|
|
43
|
+
h("div", { key: '9fe465c00b4e582aa35fcf8aad3ae245d6a4ed7d', class: classAttributes }, h("div", { key: 'b24af3425e07d97aa8761bf0ac8101951d928c33', class: containerClasses, style: aspectRatio !== null ? aspectRatio : "" }, this.imageUrl &&
|
|
44
|
+
(this._sourceSet ? (h("picture", null, this._sourceSet.map(({ src, media, type, sizes }) => (h("source", { srcSet: src, media: media, type: type, sizes: sizes || "" }))), h("img", { "fetch-priority": this.fetchPriority, loading: this.disableLazy ? "eager" : "lazy", alt: this.imageAlt, class: "hy-image__image", src: this.imageUrl, role: this.imageDecorative ? "presentation" : null }))) : (h("img", { "fetch-priority": this.fetchPriority, loading: this.disableLazy ? "eager" : "lazy", alt: this.imageAlt, class: "hy-image__image", src: this.imageUrl, role: this.imageDecorative ? "presentation" : null })))), this.caption && h("div", { key: '9355a7f0cb3bb6b0cb2865bc7d42d19fe5f8997e', class: "hy-image__caption" }, this.caption)),
|
|
45
|
+
h("hy-box", { key: 'cce99422395ff80d745676421fcbd7f83dede08a', mb: "1.75, 1.75, 2, 2.5" }),
|
|
41
46
|
];
|
|
42
47
|
}
|
|
43
48
|
static get is() { return "hy-image"; }
|
|
@@ -69,7 +74,7 @@ export class Image {
|
|
|
69
74
|
},
|
|
70
75
|
"attribute": "image-url",
|
|
71
76
|
"reflect": false,
|
|
72
|
-
"defaultValue": "
|
|
77
|
+
"defaultValue": "\"\""
|
|
73
78
|
},
|
|
74
79
|
"imageAlt": {
|
|
75
80
|
"type": "string",
|
|
@@ -87,7 +92,7 @@ export class Image {
|
|
|
87
92
|
},
|
|
88
93
|
"attribute": "image-alt",
|
|
89
94
|
"reflect": false,
|
|
90
|
-
"defaultValue": "
|
|
95
|
+
"defaultValue": "\"\""
|
|
91
96
|
},
|
|
92
97
|
"disableLazy": {
|
|
93
98
|
"type": "boolean",
|
|
@@ -129,7 +134,7 @@ export class Image {
|
|
|
129
134
|
},
|
|
130
135
|
"attribute": "fetch-priority",
|
|
131
136
|
"reflect": false,
|
|
132
|
-
"defaultValue": "
|
|
137
|
+
"defaultValue": "\"auto\""
|
|
133
138
|
},
|
|
134
139
|
"caption": {
|
|
135
140
|
"type": "string",
|
|
@@ -185,6 +190,24 @@ export class Image {
|
|
|
185
190
|
"reflect": false,
|
|
186
191
|
"defaultValue": "9"
|
|
187
192
|
},
|
|
193
|
+
"imageDecorative": {
|
|
194
|
+
"type": "boolean",
|
|
195
|
+
"mutable": false,
|
|
196
|
+
"complexType": {
|
|
197
|
+
"original": "boolean",
|
|
198
|
+
"resolved": "boolean",
|
|
199
|
+
"references": {}
|
|
200
|
+
},
|
|
201
|
+
"required": false,
|
|
202
|
+
"optional": false,
|
|
203
|
+
"docs": {
|
|
204
|
+
"tags": [],
|
|
205
|
+
"text": ""
|
|
206
|
+
},
|
|
207
|
+
"attribute": "image-decorative",
|
|
208
|
+
"reflect": false,
|
|
209
|
+
"defaultValue": "false"
|
|
210
|
+
},
|
|
188
211
|
"sourceSet": {
|
|
189
212
|
"type": "string",
|
|
190
213
|
"mutable": false,
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
p.hy-ingress {
|
|
13
13
|
color: var(--ds-palette-black-95);
|
|
14
14
|
font-family: var(--ds-fontFamily-body);
|
|
15
|
-
font-size: var(--ds-fontSize-
|
|
15
|
+
font-size: var(--ds-fontSize-18);
|
|
16
16
|
font-weight: var(--ds-fontWeight-regular);
|
|
17
17
|
letter-spacing: var(--ds-letterSpacing-wide);
|
|
18
18
|
line-height: var(--ds-lineHeight-large);
|
|
@@ -23,25 +23,7 @@ p.hy-ingress {
|
|
|
23
23
|
}
|
|
24
24
|
@media (min-width: 60rem) {
|
|
25
25
|
p.hy-ingress {
|
|
26
|
-
font-size: var(--ds-fontSize-
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
@media (min-width: 30rem) {
|
|
30
|
-
p.hy-ingress {
|
|
31
|
-
color: var(--ds-palette-black-95);
|
|
32
|
-
font-family: var(--ds-fontFamily-body);
|
|
33
|
-
font-size: var(--ds-fontSize-16);
|
|
34
|
-
font-weight: var(--ds-fontWeight-regular);
|
|
35
|
-
letter-spacing: var(--ds-letterSpacing-wide);
|
|
36
|
-
line-height: var(--ds-lineHeight-large);
|
|
37
|
-
-ms-hyphens: auto;
|
|
38
|
-
hyphens: auto;
|
|
39
|
-
text-wrap: pretty;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
@media (min-width: 30rem) and (min-width: 60rem) {
|
|
43
|
-
p.hy-ingress {
|
|
44
|
-
font-size: var(--ds-fontSize-18);
|
|
26
|
+
font-size: var(--ds-fontSize-20);
|
|
45
27
|
}
|
|
46
28
|
}
|
|
47
29
|
@media (min-width: 60rem) {
|
|
@@ -51,28 +33,14 @@ p.hy-ingress {
|
|
|
51
33
|
}
|
|
52
34
|
@media (min-width: 1601px) {
|
|
53
35
|
p.hy-ingress {
|
|
54
|
-
color: var(--ds-palette-black-95);
|
|
55
|
-
font-family: var(--ds-fontFamily-body);
|
|
56
|
-
font-size: var(--ds-fontSize-16);
|
|
57
|
-
font-weight: var(--ds-fontWeight-regular);
|
|
58
|
-
letter-spacing: var(--ds-letterSpacing-wide);
|
|
59
|
-
line-height: var(--ds-lineHeight-large);
|
|
60
|
-
-ms-hyphens: auto;
|
|
61
|
-
hyphens: auto;
|
|
62
|
-
text-wrap: pretty;
|
|
63
36
|
margin: 0 0 3rem;
|
|
64
37
|
}
|
|
65
38
|
}
|
|
66
|
-
@media (min-width: 1601px) and (min-width: 60rem) {
|
|
67
|
-
p.hy-ingress {
|
|
68
|
-
font-size: var(--ds-fontSize-18);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
39
|
@media (min-width: 75.0625rem) {
|
|
72
40
|
p.hy-ingress__large {
|
|
73
41
|
color: var(--ds-palette-black-95);
|
|
74
42
|
font-family: var(--ds-fontFamily-body);
|
|
75
|
-
font-size: var(--ds-fontSize-
|
|
43
|
+
font-size: var(--ds-fontSize-18);
|
|
76
44
|
font-weight: var(--ds-fontWeight-regular);
|
|
77
45
|
letter-spacing: var(--ds-letterSpacing-wide);
|
|
78
46
|
line-height: var(--ds-lineHeight-large);
|
|
@@ -84,6 +52,6 @@ p.hy-ingress {
|
|
|
84
52
|
}
|
|
85
53
|
@media (min-width: 75.0625rem) and (min-width: 60rem) {
|
|
86
54
|
p.hy-ingress__large {
|
|
87
|
-
font-size: var(--ds-fontSize-
|
|
55
|
+
font-size: var(--ds-fontSize-20);
|
|
88
56
|
}
|
|
89
57
|
}
|
|
@@ -359,4 +359,324 @@
|
|
|
359
359
|
height: 40px;
|
|
360
360
|
padding: 7px;
|
|
361
361
|
width: 40px;
|
|
362
|
+
}
|
|
363
|
+
/*
|
|
364
|
+
Cludo autocomplete
|
|
365
|
+
*/
|
|
366
|
+
#search_autocomplete .cludo-sayt__no-result-text p a:focus,
|
|
367
|
+
#search_autocomplete .cludo-sayt__no-result-text p a:hover,
|
|
368
|
+
#search_autocomplete .cludo-sayt__results-tophit a:focus h3,
|
|
369
|
+
#search_autocomplete .cludo-sayt__results-tophit a:hover h3,
|
|
370
|
+
#search_autocomplete .cludo-sayt__results-tophit-title-link:focus,
|
|
371
|
+
#search_autocomplete .cludo-sayt__results-tophit-title-link:hover,
|
|
372
|
+
#search_autocomplete .cludo-sayt__results-tophit.active h3,
|
|
373
|
+
#search_autocomplete .cludo-sayt__results-tophit.people-result a:focus h3,
|
|
374
|
+
#search_autocomplete .cludo-sayt__results-tophit.people-result a:hover h3 {
|
|
375
|
+
text-decoration: underline;
|
|
376
|
+
}
|
|
377
|
+
#search_autocomplete {
|
|
378
|
+
position: absolute;
|
|
379
|
+
width: 100%;
|
|
380
|
+
top: 100%;
|
|
381
|
+
left: 0;
|
|
382
|
+
padding: 0;
|
|
383
|
+
z-index: 5;
|
|
384
|
+
}
|
|
385
|
+
#search_autocomplete * {
|
|
386
|
+
font-family: "Open Sans", Helvetica, Arial, sans-serif;
|
|
387
|
+
}
|
|
388
|
+
#search_autocomplete h3 {
|
|
389
|
+
font-size: 0.875rem;
|
|
390
|
+
width: -webkit-fit-content;
|
|
391
|
+
width: -moz-fit-content;
|
|
392
|
+
width: fit-content;
|
|
393
|
+
}
|
|
394
|
+
#search_autocomplete .cludo-sayt {
|
|
395
|
+
display: -webkit-box;
|
|
396
|
+
display: -ms-flexbox;
|
|
397
|
+
display: flex;
|
|
398
|
+
-webkit-box-orient: vertical;
|
|
399
|
+
-webkit-box-direction: normal;
|
|
400
|
+
-ms-flex-direction: column;
|
|
401
|
+
flex-direction: column;
|
|
402
|
+
width: 100%;
|
|
403
|
+
background-color: #fff;
|
|
404
|
+
-webkit-box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.1);
|
|
405
|
+
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.1);
|
|
406
|
+
margin: 0;
|
|
407
|
+
padding: 12px 15px;
|
|
408
|
+
border: 1px solid #d2d2d2;
|
|
409
|
+
}
|
|
410
|
+
#search_autocomplete .cludo-sayt h3 {
|
|
411
|
+
line-height: 1.25rem;
|
|
412
|
+
}
|
|
413
|
+
#search_autocomplete .cludo-sayt__suggestions {
|
|
414
|
+
border-bottom: 1px solid #d2d2d2;
|
|
415
|
+
}
|
|
416
|
+
#search_autocomplete .cludo-sayt__suggestions > h3 {
|
|
417
|
+
margin: 0;
|
|
418
|
+
white-space: nowrap;
|
|
419
|
+
}
|
|
420
|
+
#search_autocomplete .cludo-sayt__suggestions::-webkit-scrollbar {
|
|
421
|
+
height: 8px;
|
|
422
|
+
}
|
|
423
|
+
#search_autocomplete .cludo-sayt__suggestions::-webkit-scrollbar:empty {
|
|
424
|
+
display: none;
|
|
425
|
+
}
|
|
426
|
+
#search_autocomplete .cludo-sayt__suggestions::-webkit-scrollbar-thumb {
|
|
427
|
+
background: #c7c7c7;
|
|
428
|
+
border-radius: 20px;
|
|
429
|
+
cursor: pointer;
|
|
430
|
+
}
|
|
431
|
+
#search_autocomplete .cludo-sayt__suggestions::-webkit-scrollbar-thumb:hover {
|
|
432
|
+
background: #878787;
|
|
433
|
+
}
|
|
434
|
+
#search_autocomplete .cludo-sayt__suggestions-list {
|
|
435
|
+
display: -webkit-box;
|
|
436
|
+
display: -ms-flexbox;
|
|
437
|
+
display: flex;
|
|
438
|
+
gap: 12px;
|
|
439
|
+
overflow-x: scroll;
|
|
440
|
+
overflow-y: hidden;
|
|
441
|
+
padding: 8px 0 12px;
|
|
442
|
+
margin: 0;
|
|
443
|
+
list-style-type: none;
|
|
444
|
+
}
|
|
445
|
+
#search_autocomplete .cludo-sayt__suggestion {
|
|
446
|
+
white-space: nowrap;
|
|
447
|
+
background-color: #f5f5f5;
|
|
448
|
+
padding: 10.05px 18.76px;
|
|
449
|
+
border-radius: 16.75px;
|
|
450
|
+
font-size: 0.813rem;
|
|
451
|
+
cursor: pointer;
|
|
452
|
+
}
|
|
453
|
+
#search_autocomplete .cludo-sayt__suggestion.active,
|
|
454
|
+
#search_autocomplete .cludo-sayt__suggestion:focus,
|
|
455
|
+
#search_autocomplete .cludo-sayt__suggestion:hover {
|
|
456
|
+
color: #107eab;
|
|
457
|
+
text-decoration: underline;
|
|
458
|
+
}
|
|
459
|
+
#search_autocomplete .cludo-sayt__results {
|
|
460
|
+
padding: 1rem 0;
|
|
461
|
+
}
|
|
462
|
+
#search_autocomplete .cludo-sayt__people-search-categories > div {
|
|
463
|
+
margin-top: 24px;
|
|
464
|
+
}
|
|
465
|
+
#search_autocomplete .cludo-sayt__results-tophit-container:not(:last-child) {
|
|
466
|
+
margin-bottom: 24px;
|
|
467
|
+
}
|
|
468
|
+
#search_autocomplete .cludo-sayt__results-tophit-title {
|
|
469
|
+
display: -webkit-box;
|
|
470
|
+
display: -ms-flexbox;
|
|
471
|
+
display: flex;
|
|
472
|
+
gap: 8px;
|
|
473
|
+
-webkit-box-align: center;
|
|
474
|
+
-ms-flex-align: center;
|
|
475
|
+
align-items: center;
|
|
476
|
+
margin: 0 0 16px;
|
|
477
|
+
color: #000;
|
|
478
|
+
font-weight: 600;
|
|
479
|
+
}
|
|
480
|
+
#search_autocomplete .cludo-sayt__results-tophit-title-link {
|
|
481
|
+
color: #107eab;
|
|
482
|
+
font-weight: 600;
|
|
483
|
+
cursor: pointer;
|
|
484
|
+
}
|
|
485
|
+
#search_autocomplete .cludo-sayt__results-tophit-title-no-link {
|
|
486
|
+
color: #107eab;
|
|
487
|
+
font-weight: 600;
|
|
488
|
+
}
|
|
489
|
+
#search_autocomplete .cludo-sayt__no-result-text p {
|
|
490
|
+
margin: 0;
|
|
491
|
+
padding: 0;
|
|
492
|
+
color: #222;
|
|
493
|
+
font-size: 0.875rem;
|
|
494
|
+
font-weight: 600;
|
|
495
|
+
}
|
|
496
|
+
#search_autocomplete .cludo-sayt__no-result-text p a {
|
|
497
|
+
color: #107eab;
|
|
498
|
+
text-decoration: none;
|
|
499
|
+
cursor: pointer;
|
|
500
|
+
}
|
|
501
|
+
#search_autocomplete .cludo-sayt__results-tophits {
|
|
502
|
+
margin: 0;
|
|
503
|
+
padding: 0;
|
|
504
|
+
list-style-type: none;
|
|
505
|
+
}
|
|
506
|
+
#search_autocomplete .cludo-sayt__results-tophit:not(:last-of-type) {
|
|
507
|
+
margin-bottom: 16px;
|
|
508
|
+
}
|
|
509
|
+
#search_autocomplete .cludo-sayt__results-tophit.tool a {
|
|
510
|
+
display: -webkit-box !important;
|
|
511
|
+
display: -ms-flexbox !important;
|
|
512
|
+
display: flex !important;
|
|
513
|
+
gap: 8px;
|
|
514
|
+
-webkit-box-align: center;
|
|
515
|
+
-ms-flex-align: center;
|
|
516
|
+
align-items: center;
|
|
517
|
+
}
|
|
518
|
+
#search_autocomplete .cludo-sayt__results-tophit.tool a .cludo-sayt__tool {
|
|
519
|
+
display: -webkit-box;
|
|
520
|
+
display: -ms-flexbox;
|
|
521
|
+
display: flex;
|
|
522
|
+
-webkit-box-align: center;
|
|
523
|
+
-ms-flex-align: center;
|
|
524
|
+
align-items: center;
|
|
525
|
+
-webkit-box-pack: center;
|
|
526
|
+
-ms-flex-pack: center;
|
|
527
|
+
justify-content: center;
|
|
528
|
+
width: 34px;
|
|
529
|
+
height: 34px;
|
|
530
|
+
border-radius: 5px;
|
|
531
|
+
background-color: #107eab;
|
|
532
|
+
color: #fff;
|
|
533
|
+
font-size: 14px;
|
|
534
|
+
font-weight: 600;
|
|
535
|
+
}
|
|
536
|
+
#search_autocomplete .cludo-sayt__results-tophit a {
|
|
537
|
+
display: block;
|
|
538
|
+
font-weight: 600;
|
|
539
|
+
font-size: 0.875rem;
|
|
540
|
+
text-decoration: none;
|
|
541
|
+
cursor: pointer;
|
|
542
|
+
}
|
|
543
|
+
#search_autocomplete .cludo-sayt__results-tophit a h3 {
|
|
544
|
+
font-weight: 500;
|
|
545
|
+
color: #222;
|
|
546
|
+
margin: 0;
|
|
547
|
+
}
|
|
548
|
+
#search_autocomplete .cludo-sayt__results-tophit a span {
|
|
549
|
+
color: #979797;
|
|
550
|
+
font-size: 0.688rem;
|
|
551
|
+
}
|
|
552
|
+
#search_autocomplete .cludo-sayt__results-tophit.people-result a {
|
|
553
|
+
display: -webkit-box;
|
|
554
|
+
display: -ms-flexbox;
|
|
555
|
+
display: flex;
|
|
556
|
+
gap: 8px;
|
|
557
|
+
color: #222;
|
|
558
|
+
}
|
|
559
|
+
#search_autocomplete .cludo-sayt__results-tophit.people-result .people-result__image {
|
|
560
|
+
display: -webkit-box;
|
|
561
|
+
display: -ms-flexbox;
|
|
562
|
+
display: flex;
|
|
563
|
+
-webkit-box-align: center;
|
|
564
|
+
-ms-flex-align: center;
|
|
565
|
+
align-items: center;
|
|
566
|
+
-webkit-box-pack: center;
|
|
567
|
+
-ms-flex-pack: center;
|
|
568
|
+
justify-content: center;
|
|
569
|
+
width: 60px;
|
|
570
|
+
min-width: 60px;
|
|
571
|
+
height: 60px;
|
|
572
|
+
min-height: 60px;
|
|
573
|
+
border-radius: 0;
|
|
574
|
+
background-color: var(--brand-main-light);
|
|
575
|
+
background-size: cover;
|
|
576
|
+
color: var(--grayscale-white);
|
|
577
|
+
font-size: 1rem;
|
|
578
|
+
line-height: 32px;
|
|
579
|
+
font-weight: 700;
|
|
580
|
+
letter-spacing: 0.48px;
|
|
581
|
+
overflow: hidden;
|
|
582
|
+
}
|
|
583
|
+
#search_autocomplete .cludo-sayt__results-tophit.people-result .people-result__image img {
|
|
584
|
+
width: 100%;
|
|
585
|
+
}
|
|
586
|
+
#search_autocomplete .cludo-sayt__results-tophit.people-result .people-result__content h3 {
|
|
587
|
+
font-size: 1rem;
|
|
588
|
+
font-weight: 700;
|
|
589
|
+
}
|
|
590
|
+
#search_autocomplete .cludo-sayt__results-tophit.people-result .people-result__content p {
|
|
591
|
+
margin: 0;
|
|
592
|
+
font-weight: 400;
|
|
593
|
+
}
|
|
594
|
+
#search_autocomplete .cludo-sayt__all-results {
|
|
595
|
+
border-top: 1px solid #d2d2d2;
|
|
596
|
+
padding-top: 16px;
|
|
597
|
+
}
|
|
598
|
+
@media (min-width: 931px) {
|
|
599
|
+
#search_autocomplete .cludo-sayt {
|
|
600
|
+
width: 100%;
|
|
601
|
+
background-color: #fff;
|
|
602
|
+
-webkit-box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.1);
|
|
603
|
+
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.1);
|
|
604
|
+
margin: 0;
|
|
605
|
+
padding: 0 16px;
|
|
606
|
+
border: 1px solid #d2d2d2;
|
|
607
|
+
}
|
|
608
|
+
#search_autocomplete .cludo-sayt__suggestions {
|
|
609
|
+
display: -webkit-box;
|
|
610
|
+
display: -ms-flexbox;
|
|
611
|
+
display: flex;
|
|
612
|
+
-webkit-box-align: center;
|
|
613
|
+
-ms-flex-align: center;
|
|
614
|
+
align-items: center;
|
|
615
|
+
gap: 12px;
|
|
616
|
+
overflow-x: scroll;
|
|
617
|
+
overflow-y: hidden;
|
|
618
|
+
}
|
|
619
|
+
#search_autocomplete .cludo-sayt__suggestions-list {
|
|
620
|
+
overflow: visible;
|
|
621
|
+
padding: 12px 0;
|
|
622
|
+
}
|
|
623
|
+
#search_autocomplete .cludo-sayt__results {
|
|
624
|
+
padding: 0;
|
|
625
|
+
display: grid;
|
|
626
|
+
grid-template-columns: 1fr 1fr;
|
|
627
|
+
}
|
|
628
|
+
#search_autocomplete .cludo-sayt__main-search-categories {
|
|
629
|
+
padding: 1rem;
|
|
630
|
+
}
|
|
631
|
+
#search_autocomplete .cludo-sayt__people-search-categories {
|
|
632
|
+
border-left: 1px solid #d2d2d2;
|
|
633
|
+
padding: 1rem;
|
|
634
|
+
}
|
|
635
|
+
#search_autocomplete .cludo-sayt__people-search-categories > div {
|
|
636
|
+
margin-top: 0;
|
|
637
|
+
}
|
|
638
|
+
#search_autocomplete .cludo-sayt__all-results {
|
|
639
|
+
padding: 16px 0;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
#search_autocomplete .cludo-sayt__all-results a {
|
|
643
|
+
display: -webkit-box;
|
|
644
|
+
display: -ms-flexbox;
|
|
645
|
+
display: flex;
|
|
646
|
+
-webkit-box-align: center;
|
|
647
|
+
-ms-flex-align: center;
|
|
648
|
+
align-items: center;
|
|
649
|
+
gap: 8px;
|
|
650
|
+
width: -webkit-fit-content;
|
|
651
|
+
width: -moz-fit-content;
|
|
652
|
+
width: fit-content;
|
|
653
|
+
margin: 0 auto;
|
|
654
|
+
border: none;
|
|
655
|
+
background-color: #107eab;
|
|
656
|
+
color: #fff;
|
|
657
|
+
font-weight: 700;
|
|
658
|
+
font-size: 1rem;
|
|
659
|
+
padding: 13px 16px;
|
|
660
|
+
cursor: pointer;
|
|
661
|
+
}
|
|
662
|
+
#search_autocomplete .cludo-sayt__all-results a:focus,
|
|
663
|
+
#search_autocomplete .cludo-sayt__all-results a:hover {
|
|
664
|
+
background: #005379;
|
|
665
|
+
}
|
|
666
|
+
#search_autocomplete .cludo-sayt__other {
|
|
667
|
+
padding: 22px 0;
|
|
668
|
+
}
|
|
669
|
+
#search_autocomplete .cludo-sayt__other h3 {
|
|
670
|
+
font-size: 18px;
|
|
671
|
+
letter-spacing: -0.56px;
|
|
672
|
+
margin-bottom: 7.5px;
|
|
673
|
+
}
|
|
674
|
+
.cludo-sr-only {
|
|
675
|
+
position: absolute;
|
|
676
|
+
width: 1px;
|
|
677
|
+
height: 1px;
|
|
678
|
+
padding: 0;
|
|
679
|
+
overflow: hidden;
|
|
680
|
+
clip: rect(0, 0, 0, 0);
|
|
681
|
+
border: 0;
|
|
362
682
|
}
|
|
@@ -95,6 +95,9 @@ export class SiteSearch {
|
|
|
95
95
|
// Without setTimeout it will not focus the input because it hasn't rendered yet.
|
|
96
96
|
setTimeout(() => {
|
|
97
97
|
const searchInput = this.el.shadowRoot.querySelector("input#search");
|
|
98
|
+
if (window.registerNavSearchInput && searchInput) {
|
|
99
|
+
window.registerNavSearchInput('#cludo-search-form input#search');
|
|
100
|
+
}
|
|
98
101
|
searchInput === null || searchInput === void 0 ? void 0 : searchInput.focus();
|
|
99
102
|
});
|
|
100
103
|
}
|
|
@@ -107,24 +110,24 @@ export class SiteSearch {
|
|
|
107
110
|
render() {
|
|
108
111
|
const currentPageUrlPathName = window.location.pathname;
|
|
109
112
|
const searchPagePathNames = ["/fi/haku", "/en/search", "/sv/sök"];
|
|
110
|
-
return (h("div", { key: '
|
|
113
|
+
return (h("div", { key: '14308fcbac8e2b4c7e7b4a3393b8ddbc48ada624', class: {
|
|
111
114
|
"site-search": true,
|
|
112
115
|
"site-search__is-open": this.isSearchPanelOpen,
|
|
113
116
|
"is-group": this.isGroup,
|
|
114
|
-
} }, h("button", { key: '
|
|
117
|
+
} }, h("button", { key: '99285de74d03d93fae04aa14781f3465d4afa2dd', "aria-label": this.showLabel ? this._labels["open"] : "", "aria-expanded": `${this.isSearchPanelOpen}`, class: {
|
|
115
118
|
"button--search": true,
|
|
116
119
|
"is-open--menu": this.isAlternative,
|
|
117
120
|
"is-open": this.isSearchPanelOpen,
|
|
118
121
|
"is-active": searchPagePathNames.some((item) => item === currentPageUrlPathName),
|
|
119
|
-
}, 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", { key: '
|
|
122
|
+
}, 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", { key: 'f609b6379b4d3be08c203f7b00d6b231e7135e7d', icon: "hy-icon-search", size: this.size, fill: this.color })), (!this.isLuomusGroup && this.isSearchPanelOpen) && (h("div", { key: '77a1cb514c734d144a6e17e0f892edbe09508d9d', class: {
|
|
120
123
|
"site-search__panel": true,
|
|
121
124
|
"site-search__panel__is-open": this.isSearchPanelOpen,
|
|
122
|
-
}, "aria-hidden": `${!this.isSearchPanelOpen}` }, h("div", { key: '
|
|
125
|
+
}, "aria-hidden": `${!this.isSearchPanelOpen}` }, h("div", { key: 'f1d57468a0d5188b138854b44a68ad6b45c6aff5', class: "site-search__panel__content" }, h("div", { key: '5ac01fafec4b9b0bc210eb9ec6065275f819b077', class: "site-search__panel__wrapper" }, h("div", { key: 'f0d2267d4045c0398d251461f43e7361ff906e7d', class: "site-search__panel__title" }, h("div", { key: '858202623ac82e4cbc75d7d66e668c5996f7d1a9', class: "site-search__panel__title__group" }, h("span", { key: '1d6b1d760629248039847b6a64b3e33c5e7c4249', class: "panel-title" }, this.searchTitleLabel), h("div", { key: '430867474c934f0d562673c60064f0b648fa43a2', class: "description" }, this.searchDescriptionLabel))), h("div", { key: 'b081666de8a7e01d68f3ed067a01ee7c76efe340', id: "cludo-search-results", class: "container_12" }, h("div", { key: 'f00c982e682076d504b45a96e194bfd8fd031d5d', class: "search-banner" }), h("div", { key: 'b1e748ca993e15b8f9247d1e47ecc05f98b1be9d', class: "search-filters search-filters-mobile" }), h("div", { key: '361b42614a73eca060df72392c295e1442f3544b', class: "col-md-12" }, h("div", { key: '7f53b4d4a31fed81263c9681cb394d80111894a6', style: { margin: "20px 0 32px" }, id: "cludo-search-content-form" }, h("hy-search-field", { key: 'afd8412f607636cd8022feb96ad9a53021d6ba82', "input-id": "search", label: "" }))), h("div", { key: '209b848f4c5c16e51e4d78da3a394c3714861aa8', class: "col-md-3" }, h("div", { key: '5bf7e7a5d5218a11174758356c3fe8b9ef7b6e1e', class: "search-filters", "aria-controls": "search-results" })), h("div", { key: 'a801c5fdbb998e6c2dfa6457c25ff7ed18d6e561', class: "col-md-9" }, h("div", { key: '36e3d2b77d365ff50d2542f288d134769d9a77cd', class: "search-results-container" }, h("hy-paragraph-text", { key: '223f7604ab9a457ae375bb6bd81b7643450c384c' }, h("div", { key: '3315875631f74684d7416544462fc6804f213187', class: "search-result-count" })), h("div", { key: '645c792076ad5a67fa27907630518d47b2ff1796', class: "search-did-you-mean", role: "Complementary" }), h("div", { key: 'ce78be3a28bb44aa4a29cf7905c653ea6cfc14ea', class: "search-results", role: "region", id: "search-results", "aria-live": "polite" })))), this._searchTools && this._searchTools.length > 0 && (h("div", { key: '4a6f518bf6d40be1e82ff1bcbe9aee1d3575ebcd', class: "site-search__panel__tools" }, h("div", { key: 'a3cd2c0329258d5d7d0795aa0f2705badc679903', class: "title" }, this.searchToolsLabel), h("div", { key: 'd069bbf2cb1d48683b66c15359e5e97a2ea6eece', class: "list" }, this._searchTools.map((i) => {
|
|
123
126
|
let searchToolTarget = i.isExternal ? "_blank" : "_self";
|
|
124
127
|
return (h("a", { class: "search-special-tool", href: i.url, target: searchToolTarget }, h("hy-icon", { icon: "hy-icon-arrow-to-right", size: 24, fill: ColorVariant.black }), h("span", { class: "label" }, i.label), h("span", { class: "description" }, i.description)));
|
|
125
|
-
})))), h("button", { key: '
|
|
128
|
+
})))), h("button", { key: '06a6bdcec4873807cb9b08ff615842fc7409f0f7', onClick: () => this.closeSearchPanel(), class: {
|
|
126
129
|
"site-search__panel__panel-toggle": true,
|
|
127
|
-
}, "aria-label": this.searchCloseLabel, "aria-expanded": `${this.isSearchPanelOpen}` }, h("span", { key: '
|
|
130
|
+
}, "aria-label": this.searchCloseLabel, "aria-expanded": `${this.isSearchPanelOpen}` }, h("span", { key: 'ba2030a8c26279c9531018e9d7223ba1c389703e', class: "site-search__panel__panel-toggle__label" }, h("span", { key: 'ff78542648700dc2091aae9fb91021732571b7c1', class: "site-search__panel__panel-toggle__label__title", tabindex: "0" }, this.searchCloseLabel), h("hy-icon", { key: '77e09522c187f3a5a2c56c7e5570703c696547dc', icon: "hy-icon-remove", size: 16, fill: ColorVariant.black })))), h("div", { key: 'fba05c54c93798a58549aa126cffb676376821c7', class: "site-search__panel__space-box", onClick: () => this.closeSearchPanel() }))))));
|
|
128
131
|
}
|
|
129
132
|
static get is() { return "hy-site-search"; }
|
|
130
133
|
static get encapsulation() { return "shadow"; }
|