@itcenteratunihelsinki/huds-lib 0.5.22 → 0.5.23

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 (57) 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-menu-language_2.cjs.entry.js → hy-menu-language.cjs.entry.js} +0 -19
  4. package/dist/cjs/hy-menu-mobile-breadcrumb.cjs.entry.js +25 -0
  5. package/dist/cjs/hy-menu.cjs.entry.js +2 -2
  6. package/dist/cjs/hy-paragraph-text.cjs.entry.js +1 -1
  7. package/dist/cjs/hy-person-profile.cjs.entry.js +61 -0
  8. package/dist/cjs/hy-site-header_3.cjs.entry.js +4 -3
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/collection/collection-manifest.json +2 -0
  11. package/dist/collection/components/accordion-item/accordion-item.css +5 -4
  12. package/dist/collection/components/accordion-item/accordion-item.js +20 -20
  13. package/dist/collection/components/navigation/menu/menu.js +23 -8
  14. package/dist/collection/components/paragraph-text/paragraph-text.css +9 -7
  15. package/dist/collection/components/person-profile/person-profile-listing/person-profile-listing.css +188 -0
  16. package/dist/collection/components/person-profile/person-profile-listing/person-profile.listing.js +124 -0
  17. package/dist/collection/components/person-profile/person-profile.css +506 -0
  18. package/dist/collection/components/person-profile/person-profile.js +199 -0
  19. package/dist/collection/components/site-header/site-header.css +12 -0
  20. package/dist/collection/components/site-header/site-header.js +21 -2
  21. package/dist/esm/huds-lib.js +1 -1
  22. package/dist/esm/hy-accordion-container_5.entry.js +570 -0
  23. package/dist/esm/{hy-menu-language_2.entry.js → hy-menu-language.entry.js} +1 -19
  24. package/dist/esm/hy-menu-mobile-breadcrumb.entry.js +21 -0
  25. package/dist/esm/hy-menu.entry.js +2 -2
  26. package/dist/esm/hy-paragraph-text.entry.js +1 -1
  27. package/dist/esm/hy-person-profile.entry.js +57 -0
  28. package/dist/esm/hy-site-header_3.entry.js +4 -3
  29. package/dist/esm/loader.js +1 -1
  30. package/dist/huds-lib/huds-lib.esm.js +1 -1
  31. package/dist/huds-lib/p-0b2e3057.entry.js +1 -0
  32. package/dist/huds-lib/p-3d35d226.entry.js +1 -0
  33. package/dist/huds-lib/{p-b526249a.entry.js → p-4252e76e.entry.js} +1 -1
  34. package/dist/huds-lib/p-45c60364.entry.js +1 -0
  35. package/dist/huds-lib/p-4c56d8d7.entry.js +1 -0
  36. package/dist/huds-lib/{p-bf84b857.entry.js → p-557d5e62.entry.js} +1 -1
  37. package/dist/huds-lib/p-ac362729.entry.js +1 -0
  38. package/dist/types/components/navigation/menu/menu.d.ts +2 -1
  39. package/dist/types/components/person-profile/person-profile-listing/person-profile.listing.d.ts +14 -0
  40. package/dist/types/components/person-profile/person-profile.d.ts +12 -0
  41. package/dist/types/components/site-header/site-header.d.ts +1 -0
  42. package/dist/types/components.d.ts +51 -0
  43. package/package.json +1 -1
  44. package/dist/cjs/hy-accordion-container.cjs.entry.js +0 -29
  45. package/dist/cjs/hy-accordion-item.cjs.entry.js +0 -216
  46. package/dist/cjs/hy-tabs-item.cjs.entry.js +0 -20
  47. package/dist/cjs/hy-tabs.cjs.entry.js +0 -308
  48. package/dist/esm/hy-accordion-container.entry.js +0 -25
  49. package/dist/esm/hy-accordion-item.entry.js +0 -212
  50. package/dist/esm/hy-tabs-item.entry.js +0 -16
  51. package/dist/esm/hy-tabs.entry.js +0 -304
  52. package/dist/huds-lib/p-0a3ee940.entry.js +0 -1
  53. package/dist/huds-lib/p-63334950.entry.js +0 -1
  54. package/dist/huds-lib/p-8eb879d5.entry.js +0 -1
  55. package/dist/huds-lib/p-9c2f38a6.entry.js +0 -1
  56. package/dist/huds-lib/p-d4a8d85f.entry.js +0 -1
  57. package/dist/huds-lib/p-df368663.entry.js +0 -1
@@ -50,7 +50,7 @@ export class Menu {
50
50
  },
51
51
  ];
52
52
  }
53
- componentWillLoad() {
53
+ async componentWillLoad() {
54
54
  this.breadcrumbs = [];
55
55
  }
56
56
  componentWillUpdate() {
@@ -90,13 +90,11 @@ export class Menu {
90
90
  h("div", { id: 'menu-bc-container', class: {
91
91
  'hy-mobile-menu__breadcrumbs': true,
92
92
  'is-empty': this.breadcrumbs.length === 0,
93
- } },
94
- h("hy-menu-language", { "is-mobile": true, "data-menu-language": this.dataMenuLanguage }),
95
- this.breadcrumbs.length ? ([
96
- this.breadcrumbs.map((breadcrumb) => {
97
- return (h("hy-menu-mobile-breadcrumb", { "label-back": this.menuButtonBreadcrumbReturn, "label-front-page": this.labelFrontPage, label: breadcrumb.label, bid: breadcrumb.bid }));
98
- }),
99
- ]) : (h("hy-menu-mobile-breadcrumb", { "label-back": this.menuButtonBreadcrumbReturn, "label-front-page": this.menuButtonBreadcrumbHome, label: this.menuButtonBreadcrumbHome, "is-first": true, "logo-url": this.logoUrl }))),
93
+ } }, this.breadcrumbs.length ? ([
94
+ this.breadcrumbs.map((breadcrumb) => {
95
+ return (h("hy-menu-mobile-breadcrumb", { "label-back": this.menuButtonBreadcrumbReturn, "label-front-page": this.labelFrontPage, label: breadcrumb.label, bid: breadcrumb.bid }));
96
+ }),
97
+ ]) : (h("hy-menu-mobile-breadcrumb", { "label-back": this.menuButtonBreadcrumbReturn, "label-front-page": this.menuButtonBreadcrumbHome, label: this.menuButtonBreadcrumbHome, "is-first": true, "logo-url": this.logoUrl }))),
100
98
  h("button", { class: `hy-mobile-menu__menu-close-button`, "aria-label": "Close menu", disabled: true, "aria-hidden": "true" },
101
99
  h("span", null, "Close"),
102
100
  h("hy-icon", { icon: 'hy-icon-remove', size: 16 }))),
@@ -370,6 +368,23 @@ export class Menu {
370
368
  },
371
369
  "attribute": "menu-button-breadcrumb-logourl",
372
370
  "reflect": false
371
+ },
372
+ "dataSiteHeaderLabels": {
373
+ "type": "string",
374
+ "mutable": false,
375
+ "complexType": {
376
+ "original": "string",
377
+ "resolved": "string",
378
+ "references": {}
379
+ },
380
+ "required": false,
381
+ "optional": false,
382
+ "docs": {
383
+ "tags": [],
384
+ "text": ""
385
+ },
386
+ "attribute": "data-site-header-labels",
387
+ "reflect": false
373
388
  }
374
389
  }; }
375
390
  static get states() { return {
@@ -414,9 +414,6 @@
414
414
  color: var(--link-blue);
415
415
  font-family: var(--main-font-family);
416
416
  font-weight: 600;
417
- display: -webkit-inline-box;
418
- display: -ms-inline-flexbox;
419
- display: inline-flex;
420
417
  }
421
418
 
422
419
  @media (min-width: 30rem) {
@@ -439,19 +436,24 @@
439
436
  }
440
437
 
441
438
  .hy-paragraph-text a[target=_blank]:after {
442
- display: block;
443
- content: url("data:image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 30 29' fill='rgb(4,121,165)'> <polygon points='29.207 13.783 14.756 .717 14.055 0 11.402 3.118 10.732 3.835 19.665 11.974 0 11.974 0 17.026 19.756 17.026 11.494 24.447 10.823 25.071 11.402 25.882 13.476 28.189 14.055 29 30 14.594' /> </svg>");
439
+ display: inline-block;
440
+ vertical-align: middle;
441
+ width: 12px;
442
+ height: 12px;
444
443
  margin-left: 3px;
444
+ background-size: contain;
445
+ content: "";
446
+ background-image: url("data:image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 30 29' fill='rgb(4,121,165)'> <polygon points='29.207 13.783 14.756 .717 14.055 0 11.402 3.118 10.732 3.835 19.665 11.974 0 11.974 0 17.026 19.756 17.026 11.494 24.447 10.823 25.071 11.402 25.882 13.476 28.189 14.055 29 30 14.594' /> </svg>");
445
447
  -webkit-transform: rotate(315deg);
446
448
  transform: rotate(315deg);
447
449
  }
448
450
 
449
451
  .hy-paragraph-text a[target=_blank]:after:hover {
450
- content: url("data:image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 30 29' fill='pink'> <polygon points='29.207 13.783 14.756 .717 14.055 0 11.402 3.118 10.732 3.835 19.665 11.974 0 11.974 0 17.026 19.756 17.026 11.494 24.447 10.823 25.071 11.402 25.882 13.476 28.189 14.055 29 30 14.594' /> </svg>");
452
+ background-image: url("data:image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 30 29' fill='pink'> <polygon points='29.207 13.783 14.756 .717 14.055 0 11.402 3.118 10.732 3.835 19.665 11.974 0 11.974 0 17.026 19.756 17.026 11.494 24.447 10.823 25.071 11.402 25.882 13.476 28.189 14.055 29 30 14.594' /> </svg>");
451
453
  }
452
454
 
453
455
  .hy-paragraph-text a[target=_blank]:hover:after {
454
- content: url("data:image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 30 29' fill='rgb(14,104,139)'> <polygon points='29.207 13.783 14.756 .717 14.055 0 11.402 3.118 10.732 3.835 19.665 11.974 0 11.974 0 17.026 19.756 17.026 11.494 24.447 10.823 25.071 11.402 25.882 13.476 28.189 14.055 29 30 14.594' /> </svg>");
456
+ background-image: url("data:image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 30 29' fill='rgb(14,104,139)'> <polygon points='29.207 13.783 14.756 .717 14.055 0 11.402 3.118 10.732 3.835 19.665 11.974 0 11.974 0 17.026 19.756 17.026 11.494 24.447 10.823 25.071 11.402 25.882 13.476 28.189 14.055 29 30 14.594' /> </svg>");
455
457
  }
456
458
 
457
459
  .hy-paragraph-text p {
@@ -0,0 +1,188 @@
1
+ :root {
2
+ --brand-main: #0e688b;
3
+ --brand-main-soft: #b1e7ff;
4
+ --brand-main-bright: #48c5f8;
5
+ --brand-main-light: #107eab;
6
+ --brand-main-active: #005379;
7
+ --brand-main-dark: #003146;
8
+ --brand-main-nearly-black: #000222;
9
+ --link-blue: #0479a4;
10
+ --link-disabled: #767676;
11
+ --grayscale-white: #fff;
12
+ --grayscale-slightly-gray: #fefefe;
13
+ --grayscale-light: #f8f8f8;
14
+ --grayscale-medium: #d2d2d2;
15
+ --grayscale-background-box: #f5f5f5;
16
+ --grayscale-tabs-border: #e6e6e6;
17
+ --grayscale-background-arrow: #dfdfdf;
18
+ --grayscale-medium-dark: #979797;
19
+ --grayscale-dark: #555555;
20
+ --grayscale-dark-text: #222222;
21
+ --grayscale-black: #000000;
22
+ --additional-red-light: #e5053a;
23
+ --additional-red-dark: #a31621;
24
+ --additional-purple-light: #420039;
25
+ --additional-yellow: #f9a21a;
26
+ --additional-skyblue: #48c5f8;
27
+ --additional-orange: #d14600;
28
+ --additional-green-light: #96ba3c;
29
+ --additional-green-dark: #006400;
30
+ --hover-gray: #eaeaea;
31
+ }
32
+
33
+ * {
34
+ -webkit-box-sizing: border-box;
35
+ box-sizing: border-box;
36
+ }
37
+
38
+ :root {
39
+ --gutter-mobile: 16px;
40
+ --gutter-narrow: 24px;
41
+ --gutter-medium: 24px;
42
+ --gutter-wide: 24px;
43
+ --gutter-extrawide: 32px;
44
+ }
45
+
46
+ /**
47
+ * Mixin for fluid type.
48
+ * Example usage: @include fluid-type(font-size, 320px, 1600px, 32px, 80px);
49
+ */
50
+
51
+ :root {
52
+ --breakpoint-extrawide: 75.0625rem;
53
+ --breakpoint-max-width: 75.0625rem;
54
+ --breakpoint-medium: 48rem;
55
+ --breakpoint-narrow: 30rem;
56
+ --breakpoint-wide: 60rem;
57
+ }
58
+
59
+ .hy-person-profile-listing {
60
+ font-family: var(--main-font-family);
61
+ padding: 0;
62
+ margin: 0;
63
+ list-style: none;
64
+ display: grid;
65
+ gap: 24px;
66
+ }
67
+
68
+ @media (min-width: 48rem) {
69
+ .hy-person-profile-listing {
70
+ gap: 32px 24px;
71
+ }
72
+ }
73
+
74
+ @media (min-width: 120.0625rem) {
75
+ .hy-person-profile-listing.col-2 {
76
+ grid-template-columns: repeat(2, 50%);
77
+ }
78
+ }
79
+
80
+ .hy-person-profile-listing.col-4 {
81
+ gap: 32px 24px;
82
+ }
83
+
84
+ @media (min-width: 48rem) {
85
+ .hy-person-profile-listing.col-4 {
86
+ grid-template-columns: repeat(2, 50%);
87
+ }
88
+ }
89
+
90
+ @media (min-width: 60rem) {
91
+ .hy-person-profile-listing.col-4 {
92
+ grid-template-columns: repeat(3, calc(100% / 3));
93
+ }
94
+ }
95
+
96
+ @media (min-width: 120.0625rem) {
97
+ .hy-person-profile-listing.col-4 {
98
+ grid-template-columns: repeat(4, 25%);
99
+ }
100
+ }
101
+
102
+ .hy-person-profile-listing__label {
103
+ font-size: 0.9375rem;
104
+ line-height: 18px;
105
+ font-weight: 700;
106
+ letter-spacing: -0.28px;
107
+ color: var(--grayscale-black);
108
+ margin: 0 0 8px;
109
+ }
110
+
111
+ @media (min-width: 48rem) {
112
+ .hy-person-profile-listing__label {
113
+ font-size: 1.0625rem;
114
+ line-height: 20px;
115
+ letter-spacing: -0.32px;
116
+ }
117
+ }
118
+
119
+ .hy-person-profile-listing__items {
120
+ margin: 0;
121
+ padding: 0;
122
+ list-style: none;
123
+ display: grid;
124
+ gap: 8px;
125
+ }
126
+
127
+ .is-inline .hy-person-profile-listing__items {
128
+ display: -webkit-inline-box;
129
+ display: -ms-inline-flexbox;
130
+ display: inline-flex;
131
+ -ms-flex-wrap: wrap;
132
+ flex-wrap: wrap;
133
+ gap: 0;
134
+ }
135
+
136
+ .text-tight .hy-person-profile-listing__items {
137
+ gap: 0;
138
+ }
139
+
140
+ .hy-person-profile-listing__item {
141
+ font-size: 0.9375rem;
142
+ line-height: 22px;
143
+ font-weight: 400;
144
+ color: var(--grayscale-black);
145
+ display: -webkit-inline-box;
146
+ display: -ms-inline-flexbox;
147
+ display: inline-flex;
148
+ }
149
+
150
+ @media (min-width: 48rem) {
151
+ .hy-person-profile-listing__item {
152
+ font-size: 1.0625rem;
153
+ line-height: 26px;
154
+ }
155
+ }
156
+
157
+ .hy-person-profile-listing__item a {
158
+ text-decoration: none;
159
+ color: var(--link-blue);
160
+ }
161
+
162
+ .hy-person-profile-listing__item a:hover {
163
+ text-decoration: underline;
164
+ }
165
+
166
+ .hy-person-profile-listing__item hy-icon {
167
+ display: none !important;
168
+ -webkit-box-pack: center;
169
+ -ms-flex-pack: center;
170
+ justify-content: center;
171
+ -webkit-box-align: center;
172
+ -ms-flex-align: center;
173
+ align-items: center;
174
+ height: 28px;
175
+ width: 28px;
176
+ }
177
+
178
+ @media (min-width: 48rem) {
179
+ .hy-person-profile-listing__item hy-icon {
180
+ display: -webkit-inline-box !important;
181
+ display: -ms-inline-flexbox !important;
182
+ display: inline-flex !important;
183
+ }
184
+ }
185
+
186
+ .without-icons .hy-person-profile-listing__item hy-icon {
187
+ display: none !important;
188
+ }
@@ -0,0 +1,124 @@
1
+ import { Component, Host, h, Prop } from '@stencil/core';
2
+ export class PersonProfile {
3
+ constructor() {
4
+ this.col = 'col-2';
5
+ }
6
+ render() {
7
+ return (h(Host, null,
8
+ h("ul", { class: `hy-person-profile-listing ${this.col} ${this.inline ? 'is-inline' : ''} ${this.withoutIcons ? 'without-icons' : ''} ${this.textSpacingTight ? 'text-tight' : ''}` }, this.items.map(({ label, items }) => {
9
+ if (items.filter(({ label, url }) => label !== '' && url !== '').length > 0) {
10
+ return (h("li", null,
11
+ h("h3", { class: "hy-person-profile-listing__label" }, label),
12
+ h("ul", { class: "hy-person-profile-listing__items" }, items.map(({ label, url }, index) => {
13
+ if (url) {
14
+ return (h("li", { class: "hy-person-profile-listing__item" },
15
+ h("a", { href: url },
16
+ index !== 0 && h("hy-icon", { icon: 'hy-icon-caret-right', size: 10 }),
17
+ h("span", null, label))));
18
+ }
19
+ return (h("li", { class: "hy-person-profile-listing__item" },
20
+ index !== 0 && h("hy-icon", { icon: 'hy-icon-caret-right', size: 10 }),
21
+ h("span", null, label)));
22
+ }))));
23
+ }
24
+ }))));
25
+ }
26
+ static get is() { return "hy-person-profile-listing"; }
27
+ static get encapsulation() { return "shadow"; }
28
+ static get originalStyleUrls() { return {
29
+ "$": ["person-profile-listing.scss"]
30
+ }; }
31
+ static get styleUrls() { return {
32
+ "$": ["person-profile-listing.css"]
33
+ }; }
34
+ static get properties() { return {
35
+ "items": {
36
+ "type": "unknown",
37
+ "mutable": false,
38
+ "complexType": {
39
+ "original": "personProfileListingItems",
40
+ "resolved": "[{ label: string; items: string[]; }]",
41
+ "references": {
42
+ "personProfileListingItems": {
43
+ "location": "local"
44
+ }
45
+ }
46
+ },
47
+ "required": false,
48
+ "optional": false,
49
+ "docs": {
50
+ "tags": [],
51
+ "text": ""
52
+ }
53
+ },
54
+ "col": {
55
+ "type": "string",
56
+ "mutable": false,
57
+ "complexType": {
58
+ "original": "'col-1' | 'col-2' | 'col-4'",
59
+ "resolved": "\"col-1\" | \"col-2\" | \"col-4\"",
60
+ "references": {}
61
+ },
62
+ "required": false,
63
+ "optional": true,
64
+ "docs": {
65
+ "tags": [],
66
+ "text": ""
67
+ },
68
+ "attribute": "col",
69
+ "reflect": false,
70
+ "defaultValue": "'col-2'"
71
+ },
72
+ "inline": {
73
+ "type": "boolean",
74
+ "mutable": false,
75
+ "complexType": {
76
+ "original": "boolean",
77
+ "resolved": "boolean",
78
+ "references": {}
79
+ },
80
+ "required": false,
81
+ "optional": true,
82
+ "docs": {
83
+ "tags": [],
84
+ "text": ""
85
+ },
86
+ "attribute": "inline",
87
+ "reflect": false
88
+ },
89
+ "withoutIcons": {
90
+ "type": "boolean",
91
+ "mutable": false,
92
+ "complexType": {
93
+ "original": "boolean",
94
+ "resolved": "boolean",
95
+ "references": {}
96
+ },
97
+ "required": false,
98
+ "optional": true,
99
+ "docs": {
100
+ "tags": [],
101
+ "text": ""
102
+ },
103
+ "attribute": "without-icons",
104
+ "reflect": false
105
+ },
106
+ "textSpacingTight": {
107
+ "type": "boolean",
108
+ "mutable": false,
109
+ "complexType": {
110
+ "original": "boolean",
111
+ "resolved": "boolean",
112
+ "references": {}
113
+ },
114
+ "required": false,
115
+ "optional": true,
116
+ "docs": {
117
+ "tags": [],
118
+ "text": ""
119
+ },
120
+ "attribute": "text-spacing-tight",
121
+ "reflect": false
122
+ }
123
+ }; }
124
+ }