@itcenteratunihelsinki/huds-lib 0.5.32 → 0.5.36
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/dist/cjs/huds-lib.cjs.js +1 -1
- package/dist/cjs/hy-button.cjs.entry.js +19 -1
- package/dist/cjs/hy-image.cjs.entry.js +13 -6
- package/dist/cjs/hy-link-box-list.cjs.entry.js +4 -15
- package/dist/cjs/hy-link-box.cjs.entry.js +4 -50
- package/dist/cjs/hy-paragraph-text.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/button/button.js +37 -1
- package/dist/collection/components/image/image.css +10 -4
- package/dist/collection/components/image/image.js +12 -5
- package/dist/collection/components/link-box/link-box.css +88 -349
- package/dist/collection/components/link-box/link-box.js +50 -94
- package/dist/collection/components/link-box-list/link-box-list.css +16 -24
- package/dist/collection/components/link-box-list/link-box-list.js +21 -14
- package/dist/collection/components/paragraph-text/paragraph-text.css +6 -0
- package/dist/esm/huds-lib.js +1 -1
- package/dist/esm/hy-button.entry.js +19 -1
- package/dist/esm/hy-image.entry.js +13 -6
- package/dist/esm/hy-link-box-list.entry.js +4 -15
- package/dist/esm/hy-link-box.entry.js +4 -50
- package/dist/esm/hy-paragraph-text.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/huds-lib/huds-lib.esm.js +1 -1
- package/dist/huds-lib/p-0a37696c.entry.js +1 -0
- package/dist/huds-lib/p-4d46f33b.entry.js +1 -0
- package/dist/huds-lib/{p-557d5e62.entry.js → p-570b0c50.entry.js} +1 -1
- package/dist/huds-lib/p-c1222b96.entry.js +1 -0
- package/dist/huds-lib/p-f0d518a5.entry.js +1 -0
- package/dist/types/components/button/button.d.ts +1 -0
- package/dist/types/components/link-box/link-box.d.ts +2 -8
- package/dist/types/components/link-box-list/link-box-list.d.ts +2 -1
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/huds-lib/p-b1f5686d.entry.js +0 -1
- package/dist/huds-lib/p-b950d89c.entry.js +0 -1
- package/dist/huds-lib/p-fb3bcd59.entry.js +0 -1
- package/dist/huds-lib/p-ffa7f1fb.entry.js +0 -1
|
@@ -57,165 +57,56 @@
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
:host {
|
|
60
|
+
height: 100%;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.hy-link-box-container {
|
|
60
64
|
background: var(--grayscale-background-box);
|
|
61
|
-
display: -webkit-box;
|
|
62
|
-
display: -ms-flexbox;
|
|
63
|
-
display: flex;
|
|
64
|
-
margin-bottom: 32px;
|
|
65
|
-
margin-right: 0;
|
|
66
|
-
max-width: 100%;
|
|
67
65
|
position: relative;
|
|
68
66
|
width: 100%;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
@media (min-width: 30rem) {
|
|
72
|
-
:host {
|
|
73
|
-
margin-right: var(--gutter-narrow);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
@media (min-width: 60rem) {
|
|
78
|
-
:host {
|
|
79
|
-
margin-right: var(--gutter-wide);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
@media (min-width: 75.0625rem) {
|
|
84
|
-
:host {
|
|
85
|
-
margin-right: var(--gutter-extrawide);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
:host(.big) {
|
|
90
|
-
display: -webkit-box;
|
|
91
|
-
display: -ms-flexbox;
|
|
92
|
-
display: flex;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
@media (min-width: 30rem) {
|
|
96
|
-
:host(.big) {
|
|
97
|
-
-webkit-box-flex: 1;
|
|
98
|
-
-ms-flex-positive: 1;
|
|
99
|
-
flex-grow: 1;
|
|
100
|
-
max-width: calc(((100% - var(--gutter-narrow) * 11) / 12) * 6 + var(--gutter-narrow) * 5);
|
|
101
|
-
width: calc(((100% - var(--gutter-narrow) * 11) / 12) * 6 + var(--gutter-narrow) * 5);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
@media (min-width: 60rem) {
|
|
106
|
-
:host(.big) {
|
|
107
|
-
max-width: calc(((100% - var(--gutter-wide) * 11) / 12) * 4 + var(--gutter-wide) * 3);
|
|
108
|
-
width: calc(((100% - var(--gutter-wide) * 11) / 12) * 4 + var(--gutter-wide) * 3);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
@media (min-width: 75.0625rem) {
|
|
113
|
-
:host(.big) {
|
|
114
|
-
max-width: calc(((100% - var(--gutter-extrawide) * 11) / 12) * 4 + var(--gutter-extrawide) * 3);
|
|
115
|
-
width: calc(((100% - var(--gutter-extrawide) * 11) / 12) * 4 + var(--gutter-extrawide) * 3);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
:host(.small) {
|
|
120
67
|
display: -webkit-box;
|
|
121
68
|
display: -ms-flexbox;
|
|
122
69
|
display: flex;
|
|
70
|
+
-webkit-box-orient: vertical;
|
|
71
|
+
-webkit-box-direction: normal;
|
|
72
|
+
-ms-flex-direction: column;
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
-webkit-box-pack: justify;
|
|
75
|
+
-ms-flex-pack: justify;
|
|
76
|
+
justify-content: space-between;
|
|
77
|
+
height: 100%;
|
|
78
|
+
position: relative;
|
|
123
79
|
}
|
|
124
80
|
|
|
125
|
-
|
|
126
|
-
:
|
|
127
|
-
-webkit-box-flex: 1;
|
|
128
|
-
-ms-flex-positive: 1;
|
|
129
|
-
flex-grow: 1;
|
|
130
|
-
max-width: calc(((100% - var(--gutter-narrow) * 11) / 12) * 6 + var(--gutter-narrow) * 5);
|
|
131
|
-
width: calc(((100% - var(--gutter-narrow) * 11) / 12) * 6 + var(--gutter-narrow) * 5);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
@media (min-width: 60rem) {
|
|
136
|
-
:host(.small) {
|
|
137
|
-
max-width: calc(((100% - var(--gutter-wide) * 11) / 12) * 3 + var(--gutter-wide) * 2);
|
|
138
|
-
width: calc(((100% - var(--gutter-wide) * 11) / 12) * 3 + var(--gutter-wide) * 2);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
@media (min-width: 75.0625rem) {
|
|
143
|
-
:host(.small) {
|
|
144
|
-
max-width: calc(((100% - var(--gutter-extrawide) * 11) / 12) * 3 + var(--gutter-extrawide) * 2);
|
|
145
|
-
width: calc(((100% - var(--gutter-extrawide) * 11) / 12) * 3 + var(--gutter-extrawide) * 2);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
@media (min-width: 60rem) {
|
|
150
|
-
:host(.content.big:nth-of-type(3n + 0)) {
|
|
151
|
-
display: -webkit-box;
|
|
152
|
-
display: -ms-flexbox;
|
|
153
|
-
display: flex;
|
|
154
|
-
margin-right: 0;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
:host(:nth-of-type(2n + 0)) {
|
|
159
|
-
display: -webkit-box;
|
|
160
|
-
display: -ms-flexbox;
|
|
161
|
-
display: flex;
|
|
162
|
-
margin-right: 0;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
@media (min-width: 30rem) {
|
|
166
|
-
:host(:nth-of-type(2n + 0)) {
|
|
167
|
-
margin-right: 0;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
@media (min-width: 60rem) {
|
|
172
|
-
:host(:nth-of-type(2n + 0)) {
|
|
173
|
-
margin-right: var(--gutter-wide);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
@media (min-width: 75.0625rem) {
|
|
178
|
-
:host(:nth-of-type(2n + 0)) {
|
|
179
|
-
margin-right: var(--gutter-extrawide);
|
|
180
|
-
}
|
|
81
|
+
.hy-link-box-container:focus-within {
|
|
82
|
+
outline: auto;
|
|
181
83
|
}
|
|
182
84
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
display: -ms-flexbox;
|
|
186
|
-
display: flex;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
@media (min-width: 30rem) {
|
|
190
|
-
:host(.small:nth-of-type(4n + 0)) {
|
|
191
|
-
margin-right: 0;
|
|
192
|
-
}
|
|
85
|
+
.hy-link-box-container:hover {
|
|
86
|
+
cursor: pointer;
|
|
193
87
|
}
|
|
194
88
|
|
|
195
|
-
:
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
display: flex;
|
|
199
|
-
margin-right: 0;
|
|
89
|
+
.hy-link-box-container:hover .hy-link-box__text-container__title {
|
|
90
|
+
color: var(--brand-main);
|
|
91
|
+
text-decoration: underline;
|
|
200
92
|
}
|
|
201
93
|
|
|
202
|
-
.hy-link-box-container {
|
|
203
|
-
|
|
204
|
-
width: 100%;
|
|
94
|
+
.hy-link-box-container:hover .hy-cta-link {
|
|
95
|
+
text-decoration: underline;
|
|
205
96
|
}
|
|
206
97
|
|
|
207
|
-
.hy-link-box-container:hover {
|
|
208
|
-
|
|
98
|
+
.hy-link-box-container:hover .hy-cta-link .hy-cta-link__icon {
|
|
99
|
+
background-color: var(--brand-main);
|
|
209
100
|
}
|
|
210
101
|
|
|
211
102
|
.hy-link-box__image-container {
|
|
103
|
+
margin: 0;
|
|
212
104
|
display: -webkit-box;
|
|
213
105
|
display: -ms-flexbox;
|
|
214
106
|
display: flex;
|
|
215
107
|
-webkit-box-pack: stretch;
|
|
216
108
|
-ms-flex-pack: stretch;
|
|
217
109
|
justify-content: stretch;
|
|
218
|
-
margin-bottom: 0;
|
|
219
110
|
min-height: 10rem;
|
|
220
111
|
position: relative;
|
|
221
112
|
}
|
|
@@ -239,258 +130,106 @@
|
|
|
239
130
|
width: 100%;
|
|
240
131
|
}
|
|
241
132
|
|
|
242
|
-
.hy-link-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
@media (min-width: 60rem) {
|
|
254
|
-
.hy-link-box__landing .hy-link-box__text-container {
|
|
255
|
-
padding: 0 12px;
|
|
256
|
-
}
|
|
133
|
+
.hy-link-box__image-container.is-image-missing svg {
|
|
134
|
+
position: absolute;
|
|
135
|
+
top: 50%;
|
|
136
|
+
-webkit-transform: translate(-50%, -50%);
|
|
137
|
+
transform: translate(-50%, -50%);
|
|
138
|
+
left: 50%;
|
|
139
|
+
width: 85px;
|
|
140
|
+
height: auto;
|
|
141
|
+
fill: #d2d2d2;
|
|
257
142
|
}
|
|
258
143
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
padding: 0 16px;
|
|
262
|
-
}
|
|
144
|
+
.hy-link-box__text-container {
|
|
145
|
+
padding: 16px;
|
|
263
146
|
}
|
|
264
147
|
|
|
265
|
-
.hy-link-
|
|
266
|
-
font-size: 1.
|
|
148
|
+
.hy-link-box__text-container__title {
|
|
149
|
+
font-size: 1.3125rem;
|
|
267
150
|
line-height: 28px;
|
|
268
151
|
font-weight: 700;
|
|
269
152
|
color: var(--brand-main-nearly-black);
|
|
270
153
|
font-family: var(--main-font-family);
|
|
271
|
-
letter-spacing: -0.
|
|
154
|
+
letter-spacing: -0.42px;
|
|
272
155
|
-webkit-hyphens: auto;
|
|
273
156
|
-ms-hyphens: auto;
|
|
274
157
|
hyphens: auto;
|
|
275
|
-
margin-bottom: 8px;
|
|
276
|
-
margin-top: 20px;
|
|
277
158
|
word-break: break-word;
|
|
159
|
+
margin: 0 0 16px;
|
|
278
160
|
}
|
|
279
161
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
.hy-link-box__landing .hy-link-box__text-container__title {
|
|
286
|
-
font-size: 1.5rem;
|
|
287
|
-
line-height: 30px;
|
|
288
|
-
color: var(--grayscale-black);
|
|
289
|
-
letter-spacing: -0.7px;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
@media (min-width: 60rem) {
|
|
294
|
-
.hy-link-box__landing .hy-link-box__text-container__title {
|
|
295
|
-
margin-top: 24px;
|
|
296
|
-
}
|
|
297
|
-
.hy-link-box__landing .hy-link-box__text-container__title__image {
|
|
298
|
-
margin-top: 18px;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
@media (min-width: 75.0625rem) {
|
|
303
|
-
.hy-link-box__landing .hy-link-box__text-container__title__common {
|
|
304
|
-
font-size: 1.5rem;
|
|
305
|
-
line-height: 30px;
|
|
306
|
-
letter-spacing: -0.7px;
|
|
307
|
-
}
|
|
308
|
-
.hy-link-box__landing .hy-link-box__text-container__title__large {
|
|
309
|
-
font-size: 1.75rem;
|
|
310
|
-
line-height: 36px;
|
|
311
|
-
letter-spacing: -0.8px;
|
|
312
|
-
margin-bottom: 12px;
|
|
313
|
-
margin-top: 32px;
|
|
314
|
-
}
|
|
315
|
-
.hy-link-box__landing .hy-link-box__text-container__title__large.image {
|
|
316
|
-
margin-top: 20px;
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
@media (min-width: 1601px) {
|
|
321
|
-
.hy-link-box__landing .hy-link-box__text-container__title {
|
|
322
|
-
font-size: 1.75rem;
|
|
323
|
-
line-height: 36px;
|
|
324
|
-
letter-spacing: -0.8px;
|
|
325
|
-
margin-bottom: 12px;
|
|
326
|
-
margin-top: 32px;
|
|
327
|
-
}
|
|
328
|
-
.hy-link-box__landing .hy-link-box__text-container__title__image {
|
|
329
|
-
margin-top: 20px;
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
.hy-link-box__landing .hy-link-box__text-container__description {
|
|
334
|
-
font-size: 0.875rem;
|
|
335
|
-
line-height: 18px;
|
|
336
|
-
color: var(--grayscale-dark);
|
|
337
|
-
font-family: var(--main-font-family);
|
|
338
|
-
letter-spacing: -0.2px;
|
|
339
|
-
margin-bottom: 12px;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
@media (min-width: 75.0625rem) {
|
|
343
|
-
.hy-link-box__landing .hy-link-box__text-container__description__common {
|
|
344
|
-
font-size: 0.875rem;
|
|
345
|
-
line-height: 18px;
|
|
346
|
-
letter-spacing: -0.2px;
|
|
347
|
-
}
|
|
348
|
-
.hy-link-box__landing .hy-link-box__text-container__description__large {
|
|
349
|
-
font-size: 1rem;
|
|
350
|
-
line-height: 22px;
|
|
351
|
-
letter-spacing: -0.2px;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
@media (min-width: 1601px) {
|
|
356
|
-
.hy-link-box__landing .hy-link-box__text-container__description {
|
|
357
|
-
font-size: 1rem;
|
|
358
|
-
line-height: 22px;
|
|
359
|
-
letter-spacing: -0.2px;
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
.hy-link-box__content .hy-link-box__text-container {
|
|
364
|
-
margin-bottom: 60px;
|
|
365
|
-
padding: 0 12px;
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
@media (min-width: 30rem) {
|
|
369
|
-
.hy-link-box__content .hy-link-box__text-container {
|
|
370
|
-
padding: 0 16px;
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
@media (min-width: 60rem) {
|
|
375
|
-
.hy-link-box__content .hy-link-box__text-container {
|
|
376
|
-
padding: 0 12px;
|
|
162
|
+
@media screen and (min-width: 1024px) {
|
|
163
|
+
.hy-link-box__text-container__title {
|
|
164
|
+
font-size: 1.5625rem;
|
|
165
|
+
line-height: 32px;
|
|
166
|
+
letter-spacing: -0.5px;
|
|
377
167
|
}
|
|
378
168
|
}
|
|
379
169
|
|
|
380
|
-
.hy-link-
|
|
381
|
-
font-size:
|
|
170
|
+
.hy-link-box__text-container__description {
|
|
171
|
+
font-size: 0.9375rem;
|
|
382
172
|
line-height: 22px;
|
|
383
|
-
|
|
384
|
-
color: var(--brand-main-nearly-black);
|
|
173
|
+
color: var(--grayscale-black);
|
|
385
174
|
font-family: var(--main-font-family);
|
|
386
|
-
|
|
387
|
-
-webkit-hyphens: auto;
|
|
388
|
-
-ms-hyphens: auto;
|
|
389
|
-
hyphens: auto;
|
|
390
|
-
margin-bottom: 8px;
|
|
391
|
-
margin-top: 24px;
|
|
392
|
-
word-break: break-word;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
.hy-link-box__content .hy-link-box__text-container__title__image {
|
|
396
|
-
margin-top: 20px;
|
|
175
|
+
margin: 0;
|
|
397
176
|
}
|
|
398
177
|
|
|
399
|
-
@media (min-width:
|
|
400
|
-
.hy-link-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
@media (min-width: 75.0625rem) {
|
|
406
|
-
.hy-link-box__content .hy-link-box__text-container__title__common {
|
|
407
|
-
font-size: 1.125rem;
|
|
408
|
-
line-height: 22px;
|
|
409
|
-
letter-spacing: -0.5px;
|
|
410
|
-
}
|
|
411
|
-
.hy-link-box__content .hy-link-box__text-container__title__large {
|
|
412
|
-
font-size: 1.25rem;
|
|
413
|
-
line-height: 24px;
|
|
414
|
-
letter-spacing: -0.6px;
|
|
415
|
-
margin-bottom: 12px;
|
|
416
|
-
margin-top: 32px;
|
|
417
|
-
}
|
|
418
|
-
.hy-link-box__content .hy-link-box__text-container__title__large__image {
|
|
419
|
-
margin-top: 20px;
|
|
178
|
+
@media screen and (min-width: 1024px) {
|
|
179
|
+
.hy-link-box__text-container__description {
|
|
180
|
+
font-size: 1.0625rem;
|
|
181
|
+
line-height: 26px;
|
|
420
182
|
}
|
|
421
183
|
}
|
|
422
184
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
}
|
|
431
|
-
.hy-link-box__content .hy-link-box__text-container__title__image {
|
|
432
|
-
margin-top: 20px;
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
.hy-link-box__content .hy-link-box__text-container__description {
|
|
437
|
-
font-size: 0.875rem;
|
|
438
|
-
line-height: 18px;
|
|
439
|
-
color: var(--grayscale-dark);
|
|
440
|
-
font-family: var(--main-font-family);
|
|
441
|
-
letter-spacing: -0.2px;
|
|
442
|
-
margin-bottom: 10px;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
.hy-link-box .hy-link-box__text-container__title__hover {
|
|
185
|
+
.hy-cta-link {
|
|
186
|
+
font-weight: 600;
|
|
187
|
+
font-size: 1rem;
|
|
188
|
+
line-height: 24px;
|
|
189
|
+
-webkit-box-align: center;
|
|
190
|
+
-ms-flex-align: center;
|
|
191
|
+
align-items: center;
|
|
446
192
|
color: var(--brand-main);
|
|
447
|
-
|
|
193
|
+
display: inline-grid;
|
|
194
|
+
font-family: var(--main-font-family);
|
|
195
|
+
gap: 16px;
|
|
196
|
+
grid-auto-flow: column;
|
|
197
|
+
letter-spacing: -0.5px;
|
|
198
|
+
overflow: hidden;
|
|
199
|
+
text-decoration: none;
|
|
200
|
+
margin: 0 -8px 24px 0;
|
|
201
|
+
align-self: flex-end;
|
|
448
202
|
}
|
|
449
203
|
|
|
450
|
-
.hy-
|
|
451
|
-
background-color: var(--brand-main-light);
|
|
452
|
-
bottom: 12px;
|
|
453
|
-
overflow: hidden;
|
|
204
|
+
.hy-cta-link span[aria-hidden=true] {
|
|
454
205
|
position: absolute;
|
|
455
|
-
|
|
456
|
-
z-index: 10;
|
|
206
|
+
inset: 0;
|
|
457
207
|
}
|
|
458
208
|
|
|
459
|
-
.hy-
|
|
460
|
-
|
|
209
|
+
.hy-cta-link:focus {
|
|
210
|
+
outline: none;
|
|
461
211
|
}
|
|
462
212
|
|
|
463
|
-
.hy-
|
|
464
|
-
|
|
213
|
+
.hy-cta-link__icon {
|
|
214
|
+
-webkit-box-align: center;
|
|
215
|
+
-ms-flex-align: center;
|
|
216
|
+
align-items: center;
|
|
217
|
+
background-color: var(--brand-main-light);
|
|
218
|
+
display: -webkit-inline-box;
|
|
219
|
+
display: -ms-inline-flexbox;
|
|
220
|
+
display: inline-flex;
|
|
221
|
+
height: 40px;
|
|
222
|
+
-webkit-box-pack: center;
|
|
223
|
+
-ms-flex-pack: center;
|
|
224
|
+
justify-content: center;
|
|
225
|
+
width: 40px;
|
|
465
226
|
}
|
|
466
227
|
|
|
467
|
-
.hy-
|
|
468
|
-
background-color: transparent;
|
|
469
|
-
-webkit-box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.05);
|
|
470
|
-
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.05);
|
|
228
|
+
.hy-cta-link__icon svg {
|
|
471
229
|
fill: var(--grayscale-white);
|
|
472
|
-
height: 32px;
|
|
473
|
-
padding: 6px;
|
|
474
|
-
width: 32px;
|
|
475
230
|
}
|
|
476
231
|
|
|
477
|
-
.hy-
|
|
232
|
+
.hy-cta-link__icon--external svg {
|
|
478
233
|
-webkit-transform: rotate(-45deg);
|
|
479
234
|
transform: rotate(-45deg);
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
@media (min-width: 75.0625rem) {
|
|
483
|
-
.hy-link-box-link__landing.large svg {
|
|
484
|
-
height: 40px;
|
|
485
|
-
padding: 8px;
|
|
486
|
-
width: 40px;
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
@media (min-width: 1601px) {
|
|
491
|
-
.hy-link-box-link__landing svg {
|
|
492
|
-
height: 40px;
|
|
493
|
-
padding: 8px;
|
|
494
|
-
width: 40px;
|
|
495
|
-
}
|
|
496
235
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { Component, Element, Prop, h,
|
|
1
|
+
import { Component, Element, Prop, h, Watch } from '@stencil/core';
|
|
2
2
|
import { LinkBoxVariants } from '../../utils/utils';
|
|
3
|
-
let keys = {
|
|
4
|
-
enter: 'Enter',
|
|
5
|
-
};
|
|
6
3
|
export class LinkBox {
|
|
7
4
|
constructor() {
|
|
8
5
|
this.variant = LinkBoxVariants.default;
|
|
@@ -10,6 +7,7 @@ export class LinkBox {
|
|
|
10
7
|
this.imageAlt = null;
|
|
11
8
|
this.disableLazy = false;
|
|
12
9
|
this.useSlot = false;
|
|
10
|
+
this.showLogo = false;
|
|
13
11
|
this.textDescription = null;
|
|
14
12
|
this.isExternal = false;
|
|
15
13
|
this.headerstyle = 'common';
|
|
@@ -28,43 +26,6 @@ export class LinkBox {
|
|
|
28
26
|
}
|
|
29
27
|
}
|
|
30
28
|
}
|
|
31
|
-
handleClick(event) {
|
|
32
|
-
this.openLink(event.currentTarget);
|
|
33
|
-
}
|
|
34
|
-
handleKeyDown(event) {
|
|
35
|
-
const key = event.code;
|
|
36
|
-
if (key == keys.enter) {
|
|
37
|
-
this.openLink(event.currentTarget);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
openLink(linkbox) {
|
|
41
|
-
let card = linkbox.shadowRoot.querySelector('.hy-link-box-container');
|
|
42
|
-
window.open(card.dataset.location, card.dataset.target);
|
|
43
|
-
}
|
|
44
|
-
handleMouseEnter(event) {
|
|
45
|
-
this.manageHoverEffect(event.currentTarget);
|
|
46
|
-
}
|
|
47
|
-
handleMouseLeave(event) {
|
|
48
|
-
this.manageHoverEffect(event.currentTarget, false);
|
|
49
|
-
}
|
|
50
|
-
handleOnFocusIn(event) {
|
|
51
|
-
this.manageHoverEffect(event.currentTarget);
|
|
52
|
-
}
|
|
53
|
-
handleOnFocusOut(event) {
|
|
54
|
-
this.manageHoverEffect(event.currentTarget, false);
|
|
55
|
-
}
|
|
56
|
-
manageHoverEffect(linkbox, hoverOn = true) {
|
|
57
|
-
let title = linkbox.shadowRoot.querySelector('h3.hy-link-box__text-container__title');
|
|
58
|
-
let boxLink = linkbox.shadowRoot.querySelector('.hy-icon-wrapper');
|
|
59
|
-
if (hoverOn) {
|
|
60
|
-
title.classList.add('hy-link-box__text-container__title__hover');
|
|
61
|
-
boxLink.classList.add('hy-icon-wrapper__hover');
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
title.classList.remove('hy-link-box__text-container__title__hover');
|
|
65
|
-
boxLink.classList.remove('hy-icon-wrapper__hover');
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
29
|
render() {
|
|
69
30
|
const classContainerAttributes = ['hy-link-box-container'].join(' ');
|
|
70
31
|
const classAttributes = [
|
|
@@ -75,13 +36,6 @@ export class LinkBox {
|
|
|
75
36
|
`hy-link-box__${this.headerstyle}`,
|
|
76
37
|
this.imageUrl ? 'hy-link-box--with-image' : null,
|
|
77
38
|
].join(' ');
|
|
78
|
-
const classLinkAttributes = [
|
|
79
|
-
'hy-link-box-link',
|
|
80
|
-
`hy-link-box-link__${this.variant}`,
|
|
81
|
-
`hy-link-box-link__${this.headerstyle}`,
|
|
82
|
-
this.headerstyle,
|
|
83
|
-
this.isExternal ? 'hy-link-box-link__external' : null,
|
|
84
|
-
].join(' ');
|
|
85
39
|
const classTextContainer = ['hy-link-box__text-container', this.imageUrl ? 'hy-link-box--with-image' : null].join(' ');
|
|
86
40
|
const classTitle = [
|
|
87
41
|
'hy-link-box__text-container__title',
|
|
@@ -103,20 +57,24 @@ export class LinkBox {
|
|
|
103
57
|
'--aspectRatio': `${aspect}%`,
|
|
104
58
|
};
|
|
105
59
|
return [
|
|
106
|
-
h("article", { class: classContainerAttributes
|
|
107
|
-
h("div", { class: classAttributes
|
|
60
|
+
h("article", { class: classContainerAttributes },
|
|
61
|
+
h("div", { class: classAttributes },
|
|
108
62
|
this.imageUrl &&
|
|
109
|
-
(this._sourceSet ? (h("
|
|
63
|
+
(this._sourceSet ? (h("figure", { class: "hy-link-box__image-container", style: aspectRatio },
|
|
110
64
|
h("picture", null,
|
|
111
65
|
this._sourceSet.map((item) => (h("source", { srcSet: item.src, media: item.media, type: item.type, sizes: item.sizes ? item.sizes : '' }))),
|
|
112
|
-
h("img", { loading: this.disableLazy ? 'eager' : 'lazy', "aria-hidden": "true", src: this.imageUrl, alt: this.imageAlt })))) : (h("
|
|
66
|
+
h("img", { loading: this.disableLazy ? 'eager' : 'lazy', "aria-hidden": "true", src: this.imageUrl, alt: this.imageAlt })))) : (h("figure", { class: "hy-link-box__image-container", style: aspectRatio },
|
|
113
67
|
h("img", { loading: this.disableLazy ? 'eager' : 'lazy', "aria-hidden": "true", src: this.imageUrl, alt: this.imageAlt })))),
|
|
68
|
+
!this.imageUrl && this.showLogo && (h("div", { "aria-hidden": "true", class: "hy-link-box__image-container is-image-missing" },
|
|
69
|
+
h("hy-icon", { class: { 'hy-site-logo__icon': true }, icon: 'hy-icon-hy-logo' }))),
|
|
114
70
|
h("div", { class: classTextContainer },
|
|
115
|
-
h("h3", { class: classTitle,
|
|
116
|
-
this.textDescription && h("
|
|
117
|
-
h("
|
|
118
|
-
h("
|
|
119
|
-
|
|
71
|
+
h("h3", { class: classTitle }, this.textTitle),
|
|
72
|
+
this.textDescription && (h("p", { class: classDescription }, this.textDescription.length >= 140 ? this.textDescription.slice(0, 139) + '...' : this.textDescription)))),
|
|
73
|
+
h("a", { "aria-label": this.scLabel || `${this.readMoreLabel} - ${this.textTitle}`, title: this.scLabel || `${this.readMoreLabel} - ${this.textTitle}`, href: this.url, target: target, class: `hy-cta-link hy-cta-link--default` },
|
|
74
|
+
h("span", { "aria-hidden": "true" }),
|
|
75
|
+
h("span", null, this.readMoreLabel),
|
|
76
|
+
h("span", { class: `hy-cta-link__icon ${this.isExternal ? 'hy-cta-link__icon--external' : ''}` },
|
|
77
|
+
h("hy-icon", { icon: 'hy-icon-arrow-to-right', size: 24 })))),
|
|
120
78
|
];
|
|
121
79
|
}
|
|
122
80
|
static get is() { return "hy-link-box"; }
|
|
@@ -223,6 +181,24 @@ export class LinkBox {
|
|
|
223
181
|
"reflect": false,
|
|
224
182
|
"defaultValue": "false"
|
|
225
183
|
},
|
|
184
|
+
"showLogo": {
|
|
185
|
+
"type": "boolean",
|
|
186
|
+
"mutable": false,
|
|
187
|
+
"complexType": {
|
|
188
|
+
"original": "boolean",
|
|
189
|
+
"resolved": "boolean",
|
|
190
|
+
"references": {}
|
|
191
|
+
},
|
|
192
|
+
"required": false,
|
|
193
|
+
"optional": false,
|
|
194
|
+
"docs": {
|
|
195
|
+
"tags": [],
|
|
196
|
+
"text": ""
|
|
197
|
+
},
|
|
198
|
+
"attribute": "show-logo",
|
|
199
|
+
"reflect": false,
|
|
200
|
+
"defaultValue": "false"
|
|
201
|
+
},
|
|
226
202
|
"textTitle": {
|
|
227
203
|
"type": "string",
|
|
228
204
|
"mutable": false,
|
|
@@ -310,6 +286,23 @@ export class LinkBox {
|
|
|
310
286
|
"attribute": "sc-label",
|
|
311
287
|
"reflect": false
|
|
312
288
|
},
|
|
289
|
+
"readMoreLabel": {
|
|
290
|
+
"type": "string",
|
|
291
|
+
"mutable": false,
|
|
292
|
+
"complexType": {
|
|
293
|
+
"original": "string",
|
|
294
|
+
"resolved": "string",
|
|
295
|
+
"references": {}
|
|
296
|
+
},
|
|
297
|
+
"required": false,
|
|
298
|
+
"optional": false,
|
|
299
|
+
"docs": {
|
|
300
|
+
"tags": [],
|
|
301
|
+
"text": ""
|
|
302
|
+
},
|
|
303
|
+
"attribute": "read-more-label",
|
|
304
|
+
"reflect": false
|
|
305
|
+
},
|
|
313
306
|
"headerstyle": {
|
|
314
307
|
"type": "string",
|
|
315
308
|
"mutable": false,
|
|
@@ -355,41 +348,4 @@ export class LinkBox {
|
|
|
355
348
|
"propName": "sourceSet",
|
|
356
349
|
"methodName": "srcSetWatcher"
|
|
357
350
|
}]; }
|
|
358
|
-
static get listeners() { return [{
|
|
359
|
-
"name": "click",
|
|
360
|
-
"method": "handleClick",
|
|
361
|
-
"target": undefined,
|
|
362
|
-
"capture": false,
|
|
363
|
-
"passive": false
|
|
364
|
-
}, {
|
|
365
|
-
"name": "keydown",
|
|
366
|
-
"method": "handleKeyDown",
|
|
367
|
-
"target": undefined,
|
|
368
|
-
"capture": false,
|
|
369
|
-
"passive": false
|
|
370
|
-
}, {
|
|
371
|
-
"name": "mouseenter",
|
|
372
|
-
"method": "handleMouseEnter",
|
|
373
|
-
"target": undefined,
|
|
374
|
-
"capture": false,
|
|
375
|
-
"passive": true
|
|
376
|
-
}, {
|
|
377
|
-
"name": "mouseleave",
|
|
378
|
-
"method": "handleMouseLeave",
|
|
379
|
-
"target": undefined,
|
|
380
|
-
"capture": false,
|
|
381
|
-
"passive": true
|
|
382
|
-
}, {
|
|
383
|
-
"name": "focusin",
|
|
384
|
-
"method": "handleOnFocusIn",
|
|
385
|
-
"target": undefined,
|
|
386
|
-
"capture": false,
|
|
387
|
-
"passive": false
|
|
388
|
-
}, {
|
|
389
|
-
"name": "focusout",
|
|
390
|
-
"method": "handleOnFocusOut",
|
|
391
|
-
"target": undefined,
|
|
392
|
-
"capture": false,
|
|
393
|
-
"passive": false
|
|
394
|
-
}]; }
|
|
395
351
|
}
|