@itcenteratunihelsinki/huds-lib 0.8.84 → 0.8.85
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/link-box.js
CHANGED
|
@@ -2,7 +2,7 @@ import { p as proxyCustomElement, H, h } from './index3.js';
|
|
|
2
2
|
import { n as LinkBoxVariants } from './utils.js';
|
|
3
3
|
import { d as defineCustomElement$1 } from './icon.js';
|
|
4
4
|
|
|
5
|
-
const linkBoxCss = "*{-webkit-box-sizing:border-box;box-sizing:border-box}:host{height:100%}.hy-link-box-container{background:var(--grayscale-background-box);width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;height:100%;position:relative}.hy-link-box-container:focus-within{outline:auto}.hy-link-box-container:hover{cursor:pointer}.hy-link-box-container:hover .hy-link-box__text-container__title{color:var(--brand-main);text-decoration:underline}.hy-link-box-container:hover .hy-cta-link{text-decoration:underline}.hy-link-box-container:hover .hy-cta-link .hy-cta-link__icon{background-color:var(--brand-main)}.hy-link-box__image-container{margin:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:stretch;-ms-flex-pack:stretch;justify-content:stretch;min-height:10rem;position:relative}.hy-link-box__image-container:before{content:\"\";display:block;padding-top:62.5%;width:100%}.hy-link-box__image-container img{bottom:0;height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;right:0;top:0;width:100%}.hy-link-box__image-container.is-image-missing svg{position:absolute;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);left:50%;width:85px;height:auto;fill:#d2d2d2}.hy-link-box__text-container{padding:16px}.hy-link-box__text-container__title{font-size:1.3125rem;line-height:28px;font-weight:700;color:var(--brand-main-nearly-black);font-family:var(--main-font-family);letter-spacing:-0.42px;-ms-hyphens:auto;hyphens:auto;word-break:break-word;margin:0 0 16px;text-wrap:balance}@media screen and (min-width: 1024px){.hy-link-box__text-container__title{font-size:1.5625rem;line-height:32px;letter-spacing:-0.5px}}.hy-link-box__text-container__description{font-size:0.9375rem;line-height:22px;color:var(--grayscale-black);font-family:var(--main-font-family);margin:0;text-wrap:pretty}@media screen and (min-width: 1024px){.hy-link-box__text-container__description{font-size:1.0625rem;line-height:26px}}
|
|
5
|
+
const linkBoxCss = "*{-webkit-box-sizing:border-box;box-sizing:border-box}:host{height:100%}.hy-link-box-container{background:var(--grayscale-background-box);width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;height:100%;position:relative}.hy-link-box-container:focus-within{outline:auto}.hy-link-box-container:hover{cursor:pointer}.hy-link-box-container:hover .hy-link-box__text-container__title{color:var(--brand-main);text-decoration:underline}.hy-link-box-container:hover .hy-cta-link{text-decoration:underline}.hy-link-box-container:hover .hy-cta-link .hy-cta-link__icon{background-color:var(--brand-main)}.hy-link-box-container .hy-cta-link{font-weight:600;font-size:1rem;line-height:24px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--brand-main);display:inline-grid;font-family:var(--main-font-family);gap:16px;grid-auto-flow:column;letter-spacing:-0.5px;overflow:hidden;text-decoration:none;margin:0 -8px 24px 0;align-self:flex-end}.hy-link-box-container .hy-cta-link span[aria-hidden=true]{position:absolute;inset:0}.hy-link-box-container .hy-cta-link:focus{outline:none}.hy-link-box-container .hy-cta-link__icon{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--brand-main-light);display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;height:40px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:40px}.hy-link-box-container .hy-cta-link__icon svg{fill:var(--grayscale-white)}.hy-link-box-container .hy-cta-link__icon--external svg{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.hy-link-box__image-container{margin:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:stretch;-ms-flex-pack:stretch;justify-content:stretch;min-height:10rem;position:relative}.hy-link-box__image-container:before{content:\"\";display:block;padding-top:62.5%;width:100%}.hy-link-box__image-container img{bottom:0;height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;right:0;top:0;width:100%}.hy-link-box__image-container.is-image-missing svg{position:absolute;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);left:50%;width:85px;height:auto;fill:#d2d2d2}.hy-link-box__text-container{padding:16px}.hy-link-box__text-container__title{font-size:1.3125rem;line-height:28px;font-weight:700;color:var(--brand-main-nearly-black);font-family:var(--main-font-family);letter-spacing:-0.42px;-ms-hyphens:auto;hyphens:auto;word-break:break-word;margin:0 0 16px;text-wrap:balance}@media screen and (min-width: 1024px){.hy-link-box__text-container__title{font-size:1.5625rem;line-height:32px;letter-spacing:-0.5px}}.hy-link-box__text-container__description{font-size:0.9375rem;line-height:22px;color:var(--grayscale-black);font-family:var(--main-font-family);margin:0;text-wrap:pretty}@media screen and (min-width: 1024px){.hy-link-box__text-container__description{font-size:1.0625rem;line-height:26px}}";
|
|
6
6
|
const HyLinkBoxStyle0 = linkBoxCss;
|
|
7
7
|
|
|
8
8
|
const LinkBox = /*@__PURE__*/ proxyCustomElement(class LinkBox extends H {
|
|
@@ -6,7 +6,7 @@ const index = require('./index-701b1b84.js');
|
|
|
6
6
|
const utils = require('./utils-8e26d681.js');
|
|
7
7
|
const globalScript = require('./globalScript-45e3aea7.js');
|
|
8
8
|
|
|
9
|
-
const linkBoxCss = "*{-webkit-box-sizing:border-box;box-sizing:border-box}:host{height:100%}.hy-link-box-container{background:var(--grayscale-background-box);width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;height:100%;position:relative}.hy-link-box-container:focus-within{outline:auto}.hy-link-box-container:hover{cursor:pointer}.hy-link-box-container:hover .hy-link-box__text-container__title{color:var(--brand-main);text-decoration:underline}.hy-link-box-container:hover .hy-cta-link{text-decoration:underline}.hy-link-box-container:hover .hy-cta-link .hy-cta-link__icon{background-color:var(--brand-main)}.hy-link-box__image-container{margin:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:stretch;-ms-flex-pack:stretch;justify-content:stretch;min-height:10rem;position:relative}.hy-link-box__image-container:before{content:\"\";display:block;padding-top:62.5%;width:100%}.hy-link-box__image-container img{bottom:0;height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;right:0;top:0;width:100%}.hy-link-box__image-container.is-image-missing svg{position:absolute;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);left:50%;width:85px;height:auto;fill:#d2d2d2}.hy-link-box__text-container{padding:16px}.hy-link-box__text-container__title{font-size:1.3125rem;line-height:28px;font-weight:700;color:var(--brand-main-nearly-black);font-family:var(--main-font-family);letter-spacing:-0.42px;-ms-hyphens:auto;hyphens:auto;word-break:break-word;margin:0 0 16px;text-wrap:balance}@media screen and (min-width: 1024px){.hy-link-box__text-container__title{font-size:1.5625rem;line-height:32px;letter-spacing:-0.5px}}.hy-link-box__text-container__description{font-size:0.9375rem;line-height:22px;color:var(--grayscale-black);font-family:var(--main-font-family);margin:0;text-wrap:pretty}@media screen and (min-width: 1024px){.hy-link-box__text-container__description{font-size:1.0625rem;line-height:26px}}
|
|
9
|
+
const linkBoxCss = "*{-webkit-box-sizing:border-box;box-sizing:border-box}:host{height:100%}.hy-link-box-container{background:var(--grayscale-background-box);width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;height:100%;position:relative}.hy-link-box-container:focus-within{outline:auto}.hy-link-box-container:hover{cursor:pointer}.hy-link-box-container:hover .hy-link-box__text-container__title{color:var(--brand-main);text-decoration:underline}.hy-link-box-container:hover .hy-cta-link{text-decoration:underline}.hy-link-box-container:hover .hy-cta-link .hy-cta-link__icon{background-color:var(--brand-main)}.hy-link-box-container .hy-cta-link{font-weight:600;font-size:1rem;line-height:24px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--brand-main);display:inline-grid;font-family:var(--main-font-family);gap:16px;grid-auto-flow:column;letter-spacing:-0.5px;overflow:hidden;text-decoration:none;margin:0 -8px 24px 0;align-self:flex-end}.hy-link-box-container .hy-cta-link span[aria-hidden=true]{position:absolute;inset:0}.hy-link-box-container .hy-cta-link:focus{outline:none}.hy-link-box-container .hy-cta-link__icon{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--brand-main-light);display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;height:40px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:40px}.hy-link-box-container .hy-cta-link__icon svg{fill:var(--grayscale-white)}.hy-link-box-container .hy-cta-link__icon--external svg{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.hy-link-box__image-container{margin:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:stretch;-ms-flex-pack:stretch;justify-content:stretch;min-height:10rem;position:relative}.hy-link-box__image-container:before{content:\"\";display:block;padding-top:62.5%;width:100%}.hy-link-box__image-container img{bottom:0;height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;right:0;top:0;width:100%}.hy-link-box__image-container.is-image-missing svg{position:absolute;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);left:50%;width:85px;height:auto;fill:#d2d2d2}.hy-link-box__text-container{padding:16px}.hy-link-box__text-container__title{font-size:1.3125rem;line-height:28px;font-weight:700;color:var(--brand-main-nearly-black);font-family:var(--main-font-family);letter-spacing:-0.42px;-ms-hyphens:auto;hyphens:auto;word-break:break-word;margin:0 0 16px;text-wrap:balance}@media screen and (min-width: 1024px){.hy-link-box__text-container__title{font-size:1.5625rem;line-height:32px;letter-spacing:-0.5px}}.hy-link-box__text-container__description{font-size:0.9375rem;line-height:22px;color:var(--grayscale-black);font-family:var(--main-font-family);margin:0;text-wrap:pretty}@media screen and (min-width: 1024px){.hy-link-box__text-container__description{font-size:1.0625rem;line-height:26px}}";
|
|
10
10
|
const HyLinkBoxStyle0 = linkBoxCss;
|
|
11
11
|
|
|
12
12
|
const LinkBox = class {
|
|
@@ -41,6 +41,52 @@
|
|
|
41
41
|
.hy-link-box-container:hover .hy-cta-link .hy-cta-link__icon {
|
|
42
42
|
background-color: var(--brand-main);
|
|
43
43
|
}
|
|
44
|
+
.hy-link-box-container .hy-cta-link {
|
|
45
|
+
font-weight: 600;
|
|
46
|
+
font-size: 1rem;
|
|
47
|
+
line-height: 24px;
|
|
48
|
+
-webkit-box-align: center;
|
|
49
|
+
-ms-flex-align: center;
|
|
50
|
+
align-items: center;
|
|
51
|
+
color: var(--brand-main);
|
|
52
|
+
display: inline-grid;
|
|
53
|
+
font-family: var(--main-font-family);
|
|
54
|
+
gap: 16px;
|
|
55
|
+
grid-auto-flow: column;
|
|
56
|
+
letter-spacing: -0.5px;
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
text-decoration: none;
|
|
59
|
+
margin: 0 -8px 24px 0;
|
|
60
|
+
align-self: flex-end;
|
|
61
|
+
}
|
|
62
|
+
.hy-link-box-container .hy-cta-link span[aria-hidden=true] {
|
|
63
|
+
position: absolute;
|
|
64
|
+
inset: 0;
|
|
65
|
+
}
|
|
66
|
+
.hy-link-box-container .hy-cta-link:focus {
|
|
67
|
+
outline: none;
|
|
68
|
+
}
|
|
69
|
+
.hy-link-box-container .hy-cta-link__icon {
|
|
70
|
+
-webkit-box-align: center;
|
|
71
|
+
-ms-flex-align: center;
|
|
72
|
+
align-items: center;
|
|
73
|
+
background-color: var(--brand-main-light);
|
|
74
|
+
display: -webkit-inline-box;
|
|
75
|
+
display: -ms-inline-flexbox;
|
|
76
|
+
display: inline-flex;
|
|
77
|
+
height: 40px;
|
|
78
|
+
-webkit-box-pack: center;
|
|
79
|
+
-ms-flex-pack: center;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
width: 40px;
|
|
82
|
+
}
|
|
83
|
+
.hy-link-box-container .hy-cta-link__icon svg {
|
|
84
|
+
fill: var(--grayscale-white);
|
|
85
|
+
}
|
|
86
|
+
.hy-link-box-container .hy-cta-link__icon--external svg {
|
|
87
|
+
-webkit-transform: rotate(-45deg);
|
|
88
|
+
transform: rotate(-45deg);
|
|
89
|
+
}
|
|
44
90
|
.hy-link-box__image-container {
|
|
45
91
|
margin: 0;
|
|
46
92
|
display: -webkit-box;
|
|
@@ -115,50 +161,4 @@
|
|
|
115
161
|
font-size: 1.0625rem;
|
|
116
162
|
line-height: 26px;
|
|
117
163
|
}
|
|
118
|
-
}
|
|
119
|
-
.hy-link-box__content .hy-cta-link {
|
|
120
|
-
font-weight: 600;
|
|
121
|
-
font-size: 1rem;
|
|
122
|
-
line-height: 24px;
|
|
123
|
-
-webkit-box-align: center;
|
|
124
|
-
-ms-flex-align: center;
|
|
125
|
-
align-items: center;
|
|
126
|
-
color: var(--brand-main);
|
|
127
|
-
display: inline-grid;
|
|
128
|
-
font-family: var(--main-font-family);
|
|
129
|
-
gap: 16px;
|
|
130
|
-
grid-auto-flow: column;
|
|
131
|
-
letter-spacing: -0.5px;
|
|
132
|
-
overflow: hidden;
|
|
133
|
-
text-decoration: none;
|
|
134
|
-
margin: 0 -8px 24px 0;
|
|
135
|
-
align-self: flex-end;
|
|
136
|
-
}
|
|
137
|
-
.hy-link-box__content .hy-cta-link span[aria-hidden=true] {
|
|
138
|
-
position: absolute;
|
|
139
|
-
inset: 0;
|
|
140
|
-
}
|
|
141
|
-
.hy-link-box__content .hy-cta-link:focus {
|
|
142
|
-
outline: none;
|
|
143
|
-
}
|
|
144
|
-
.hy-link-box__content .hy-cta-link__icon {
|
|
145
|
-
-webkit-box-align: center;
|
|
146
|
-
-ms-flex-align: center;
|
|
147
|
-
align-items: center;
|
|
148
|
-
background-color: var(--brand-main-light);
|
|
149
|
-
display: -webkit-inline-box;
|
|
150
|
-
display: -ms-inline-flexbox;
|
|
151
|
-
display: inline-flex;
|
|
152
|
-
height: 40px;
|
|
153
|
-
-webkit-box-pack: center;
|
|
154
|
-
-ms-flex-pack: center;
|
|
155
|
-
justify-content: center;
|
|
156
|
-
width: 40px;
|
|
157
|
-
}
|
|
158
|
-
.hy-link-box__content .hy-cta-link__icon svg {
|
|
159
|
-
fill: var(--grayscale-white);
|
|
160
|
-
}
|
|
161
|
-
.hy-link-box__content .hy-cta-link__icon--external svg {
|
|
162
|
-
-webkit-transform: rotate(-45deg);
|
|
163
|
-
transform: rotate(-45deg);
|
|
164
164
|
}
|
|
@@ -2,7 +2,7 @@ import { r as registerInstance, h, g as getElement, H as Host } from './index-2f
|
|
|
2
2
|
import { l as LinkBoxVariants } from './utils-1e7f5184.js';
|
|
3
3
|
import { j as jsonParserWorker } from './globalScript-7f6ce018.js';
|
|
4
4
|
|
|
5
|
-
const linkBoxCss = "*{-webkit-box-sizing:border-box;box-sizing:border-box}:host{height:100%}.hy-link-box-container{background:var(--grayscale-background-box);width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;height:100%;position:relative}.hy-link-box-container:focus-within{outline:auto}.hy-link-box-container:hover{cursor:pointer}.hy-link-box-container:hover .hy-link-box__text-container__title{color:var(--brand-main);text-decoration:underline}.hy-link-box-container:hover .hy-cta-link{text-decoration:underline}.hy-link-box-container:hover .hy-cta-link .hy-cta-link__icon{background-color:var(--brand-main)}.hy-link-box__image-container{margin:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:stretch;-ms-flex-pack:stretch;justify-content:stretch;min-height:10rem;position:relative}.hy-link-box__image-container:before{content:\"\";display:block;padding-top:62.5%;width:100%}.hy-link-box__image-container img{bottom:0;height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;right:0;top:0;width:100%}.hy-link-box__image-container.is-image-missing svg{position:absolute;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);left:50%;width:85px;height:auto;fill:#d2d2d2}.hy-link-box__text-container{padding:16px}.hy-link-box__text-container__title{font-size:1.3125rem;line-height:28px;font-weight:700;color:var(--brand-main-nearly-black);font-family:var(--main-font-family);letter-spacing:-0.42px;-ms-hyphens:auto;hyphens:auto;word-break:break-word;margin:0 0 16px;text-wrap:balance}@media screen and (min-width: 1024px){.hy-link-box__text-container__title{font-size:1.5625rem;line-height:32px;letter-spacing:-0.5px}}.hy-link-box__text-container__description{font-size:0.9375rem;line-height:22px;color:var(--grayscale-black);font-family:var(--main-font-family);margin:0;text-wrap:pretty}@media screen and (min-width: 1024px){.hy-link-box__text-container__description{font-size:1.0625rem;line-height:26px}}
|
|
5
|
+
const linkBoxCss = "*{-webkit-box-sizing:border-box;box-sizing:border-box}:host{height:100%}.hy-link-box-container{background:var(--grayscale-background-box);width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;height:100%;position:relative}.hy-link-box-container:focus-within{outline:auto}.hy-link-box-container:hover{cursor:pointer}.hy-link-box-container:hover .hy-link-box__text-container__title{color:var(--brand-main);text-decoration:underline}.hy-link-box-container:hover .hy-cta-link{text-decoration:underline}.hy-link-box-container:hover .hy-cta-link .hy-cta-link__icon{background-color:var(--brand-main)}.hy-link-box-container .hy-cta-link{font-weight:600;font-size:1rem;line-height:24px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--brand-main);display:inline-grid;font-family:var(--main-font-family);gap:16px;grid-auto-flow:column;letter-spacing:-0.5px;overflow:hidden;text-decoration:none;margin:0 -8px 24px 0;align-self:flex-end}.hy-link-box-container .hy-cta-link span[aria-hidden=true]{position:absolute;inset:0}.hy-link-box-container .hy-cta-link:focus{outline:none}.hy-link-box-container .hy-cta-link__icon{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--brand-main-light);display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;height:40px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:40px}.hy-link-box-container .hy-cta-link__icon svg{fill:var(--grayscale-white)}.hy-link-box-container .hy-cta-link__icon--external svg{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.hy-link-box__image-container{margin:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:stretch;-ms-flex-pack:stretch;justify-content:stretch;min-height:10rem;position:relative}.hy-link-box__image-container:before{content:\"\";display:block;padding-top:62.5%;width:100%}.hy-link-box__image-container img{bottom:0;height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;right:0;top:0;width:100%}.hy-link-box__image-container.is-image-missing svg{position:absolute;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);left:50%;width:85px;height:auto;fill:#d2d2d2}.hy-link-box__text-container{padding:16px}.hy-link-box__text-container__title{font-size:1.3125rem;line-height:28px;font-weight:700;color:var(--brand-main-nearly-black);font-family:var(--main-font-family);letter-spacing:-0.42px;-ms-hyphens:auto;hyphens:auto;word-break:break-word;margin:0 0 16px;text-wrap:balance}@media screen and (min-width: 1024px){.hy-link-box__text-container__title{font-size:1.5625rem;line-height:32px;letter-spacing:-0.5px}}.hy-link-box__text-container__description{font-size:0.9375rem;line-height:22px;color:var(--grayscale-black);font-family:var(--main-font-family);margin:0;text-wrap:pretty}@media screen and (min-width: 1024px){.hy-link-box__text-container__description{font-size:1.0625rem;line-height:26px}}";
|
|
6
6
|
const HyLinkBoxStyle0 = linkBoxCss;
|
|
7
7
|
|
|
8
8
|
const LinkBox = class {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,h as t,g as e,H as n}from"./index-2ffe17c9.js";import{l as a}from"./utils-1e7f5184.js";import{j as o}from"./globalScript-7f6ce018.js";const s=class{constructor(t){i(this,t),this.variant=a.default,this.imageUrl=null,this.imageAlt=null,this.disableLazy=!1,this.useSlot=!1,this.showLogo=!1,this.textTitle=void 0,this.textDescription=null,this.url=void 0,this.isExternal=!1,this.scLabel=void 0,this.readMoreLabel=void 0,this.headerstyle="common",this.sourceSet=void 0}srcSetWatcher(i){this._sourceSet="string"==typeof i?JSON.parse(i):i}componentWillLoad(){this.srcSetWatcher(this.sourceSet)}componentDidLoad(){let i=this.el.closest(".hy-main");i&&(i.classList.contains("with-sidebar")||(this.headerstyle="large"))}render(){const i=["hy-link-box-container"].join(" "),e=["hy-link-box",this.variant,`hy-link-box__${this.variant}`,this.headerstyle,`hy-link-box__${this.headerstyle}`,this.imageUrl?"hy-link-box--with-image":null].join(" "),n=["hy-link-box__text-container",this.imageUrl?"hy-link-box--with-image":null].join(" "),a=["hy-link-box__text-container__title",`hy-link-box__text-container__title__${this.variant}`,`hy-link-box__text-container__title__${this.headerstyle}`,this.imageUrl?"hy-link-box__text-container__title__image":"",this.imageUrl?"image":""].join(" "),o=["hy-link-box__text-container__description",`hy-link-box__text-container__description__${this.variant}`,`hy-link-box__text-container__description__${this.headerstyle}`].join(" "),s=this.isExternal?"_blank":"_self";return[t("article",{key:"d66398c2e146bdfb114a7df6e9ac9a46e0bb1181",class:i},t("div",{key:"034dbd08272bf8d14646c61f100c328643309730",class:e},this.imageUrl&&t("figure",{class:"hy-link-box__image-container",style:{"--aspectRatio":"62.5%"}},this._sourceSet?t("picture",null,this._sourceSet.map((i=>t("source",{srcSet:i.src,media:i.media,type:i.type,sizes:i.sizes?i.sizes:""}))),t("img",{loading:this.disableLazy?"eager":"lazy","aria-hidden":"true",src:this.imageUrl,alt:this.imageAlt})):t("img",{loading:this.disableLazy?"eager":"lazy","aria-hidden":"true",src:this.imageUrl,alt:this.imageAlt})),!this.imageUrl&&this.showLogo&&t("div",{key:"9bb6d340f5c68d1351e79bc99e50b5a24dde1cc2","aria-hidden":"true",class:"hy-link-box__image-container is-image-missing"},t("hy-icon",{key:"8077a642704366f4ecbf951ffc4c9d86edec47cc",class:{"hy-site-logo__icon":!0},icon:"hy-icon-hy-logo"})),t("div",{key:"69dac608e446585af251ea70e12a6079a80de312",class:n},t("h3",{key:"ec3a4c3c5468dd8cfa832b32c9b2e5de93dbbccb",class:a},this.textTitle),this.textDescription&&t("p",{key:"2287836632c27b812675f97c2a326c5c6688ffba",class:o},this.textDescription.length>=141?this.textDescription.slice(0,140)+"...":this.textDescription))),t("a",{key:"e6a1f88304688d2393174f74a75d6074eec3df88","aria-label":this.scLabel||`${this.readMoreLabel} - ${this.textTitle}`,title:this.scLabel||`${this.readMoreLabel} - ${this.textTitle}`,href:this.url,target:s,class:"hy-cta-link hy-cta-link--default"},t("span",{key:"bb5b4dd980f55b67dea7c06baca3c56dd08c79d0","aria-hidden":"true"}),t("span",{key:"9b43019cd8d8a60b54d751144958b76fc021d3fb"},this.readMoreLabel),t("span",{key:"ffddc98795e5810d3a05ba593f3063169774f892",class:"hy-cta-link__icon "+(this.isExternal?"hy-cta-link__icon--external":"")},t("hy-icon",{key:"21accddb6e934ac38507e8fe0b3f6f5990581531",icon:"hy-icon-arrow-to-right",size:24}))))]}get el(){return e(this)}static get watchers(){return{sourceSet:["srcSetWatcher"]}}};s.style='*{-webkit-box-sizing:border-box;box-sizing:border-box}:host{height:100%}.hy-link-box-container{background:var(--grayscale-background-box);width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;height:100%;position:relative}.hy-link-box-container:focus-within{outline:auto}.hy-link-box-container:hover{cursor:pointer}.hy-link-box-container:hover .hy-link-box__text-container__title{color:var(--brand-main);text-decoration:underline}.hy-link-box-container:hover .hy-cta-link{text-decoration:underline}.hy-link-box-container:hover .hy-cta-link .hy-cta-link__icon{background-color:var(--brand-main)}.hy-link-box__image-container{margin:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:stretch;-ms-flex-pack:stretch;justify-content:stretch;min-height:10rem;position:relative}.hy-link-box__image-container:before{content:"";display:block;padding-top:62.5%;width:100%}.hy-link-box__image-container img{bottom:0;height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;right:0;top:0;width:100%}.hy-link-box__image-container.is-image-missing svg{position:absolute;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);left:50%;width:85px;height:auto;fill:#d2d2d2}.hy-link-box__text-container{padding:16px}.hy-link-box__text-container__title{font-size:1.3125rem;line-height:28px;font-weight:700;color:var(--brand-main-nearly-black);font-family:var(--main-font-family);letter-spacing:-0.42px;-ms-hyphens:auto;hyphens:auto;word-break:break-word;margin:0 0 16px;text-wrap:balance}@media screen and (min-width: 1024px){.hy-link-box__text-container__title{font-size:1.5625rem;line-height:32px;letter-spacing:-0.5px}}.hy-link-box__text-container__description{font-size:0.9375rem;line-height:22px;color:var(--grayscale-black);font-family:var(--main-font-family);margin:0;text-wrap:pretty}@media screen and (min-width: 1024px){.hy-link-box__text-container__description{font-size:1.0625rem;line-height:26px}}
|
|
1
|
+
import{r as i,h as t,g as e,H as n}from"./index-2ffe17c9.js";import{l as a}from"./utils-1e7f5184.js";import{j as o}from"./globalScript-7f6ce018.js";const s=class{constructor(t){i(this,t),this.variant=a.default,this.imageUrl=null,this.imageAlt=null,this.disableLazy=!1,this.useSlot=!1,this.showLogo=!1,this.textTitle=void 0,this.textDescription=null,this.url=void 0,this.isExternal=!1,this.scLabel=void 0,this.readMoreLabel=void 0,this.headerstyle="common",this.sourceSet=void 0}srcSetWatcher(i){this._sourceSet="string"==typeof i?JSON.parse(i):i}componentWillLoad(){this.srcSetWatcher(this.sourceSet)}componentDidLoad(){let i=this.el.closest(".hy-main");i&&(i.classList.contains("with-sidebar")||(this.headerstyle="large"))}render(){const i=["hy-link-box-container"].join(" "),e=["hy-link-box",this.variant,`hy-link-box__${this.variant}`,this.headerstyle,`hy-link-box__${this.headerstyle}`,this.imageUrl?"hy-link-box--with-image":null].join(" "),n=["hy-link-box__text-container",this.imageUrl?"hy-link-box--with-image":null].join(" "),a=["hy-link-box__text-container__title",`hy-link-box__text-container__title__${this.variant}`,`hy-link-box__text-container__title__${this.headerstyle}`,this.imageUrl?"hy-link-box__text-container__title__image":"",this.imageUrl?"image":""].join(" "),o=["hy-link-box__text-container__description",`hy-link-box__text-container__description__${this.variant}`,`hy-link-box__text-container__description__${this.headerstyle}`].join(" "),s=this.isExternal?"_blank":"_self";return[t("article",{key:"d66398c2e146bdfb114a7df6e9ac9a46e0bb1181",class:i},t("div",{key:"034dbd08272bf8d14646c61f100c328643309730",class:e},this.imageUrl&&t("figure",{class:"hy-link-box__image-container",style:{"--aspectRatio":"62.5%"}},this._sourceSet?t("picture",null,this._sourceSet.map((i=>t("source",{srcSet:i.src,media:i.media,type:i.type,sizes:i.sizes?i.sizes:""}))),t("img",{loading:this.disableLazy?"eager":"lazy","aria-hidden":"true",src:this.imageUrl,alt:this.imageAlt})):t("img",{loading:this.disableLazy?"eager":"lazy","aria-hidden":"true",src:this.imageUrl,alt:this.imageAlt})),!this.imageUrl&&this.showLogo&&t("div",{key:"9bb6d340f5c68d1351e79bc99e50b5a24dde1cc2","aria-hidden":"true",class:"hy-link-box__image-container is-image-missing"},t("hy-icon",{key:"8077a642704366f4ecbf951ffc4c9d86edec47cc",class:{"hy-site-logo__icon":!0},icon:"hy-icon-hy-logo"})),t("div",{key:"69dac608e446585af251ea70e12a6079a80de312",class:n},t("h3",{key:"ec3a4c3c5468dd8cfa832b32c9b2e5de93dbbccb",class:a},this.textTitle),this.textDescription&&t("p",{key:"2287836632c27b812675f97c2a326c5c6688ffba",class:o},this.textDescription.length>=141?this.textDescription.slice(0,140)+"...":this.textDescription))),t("a",{key:"e6a1f88304688d2393174f74a75d6074eec3df88","aria-label":this.scLabel||`${this.readMoreLabel} - ${this.textTitle}`,title:this.scLabel||`${this.readMoreLabel} - ${this.textTitle}`,href:this.url,target:s,class:"hy-cta-link hy-cta-link--default"},t("span",{key:"bb5b4dd980f55b67dea7c06baca3c56dd08c79d0","aria-hidden":"true"}),t("span",{key:"9b43019cd8d8a60b54d751144958b76fc021d3fb"},this.readMoreLabel),t("span",{key:"ffddc98795e5810d3a05ba593f3063169774f892",class:"hy-cta-link__icon "+(this.isExternal?"hy-cta-link__icon--external":"")},t("hy-icon",{key:"21accddb6e934ac38507e8fe0b3f6f5990581531",icon:"hy-icon-arrow-to-right",size:24}))))]}get el(){return e(this)}static get watchers(){return{sourceSet:["srcSetWatcher"]}}};s.style='*{-webkit-box-sizing:border-box;box-sizing:border-box}:host{height:100%}.hy-link-box-container{background:var(--grayscale-background-box);width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;height:100%;position:relative}.hy-link-box-container:focus-within{outline:auto}.hy-link-box-container:hover{cursor:pointer}.hy-link-box-container:hover .hy-link-box__text-container__title{color:var(--brand-main);text-decoration:underline}.hy-link-box-container:hover .hy-cta-link{text-decoration:underline}.hy-link-box-container:hover .hy-cta-link .hy-cta-link__icon{background-color:var(--brand-main)}.hy-link-box-container .hy-cta-link{font-weight:600;font-size:1rem;line-height:24px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--brand-main);display:inline-grid;font-family:var(--main-font-family);gap:16px;grid-auto-flow:column;letter-spacing:-0.5px;overflow:hidden;text-decoration:none;margin:0 -8px 24px 0;align-self:flex-end}.hy-link-box-container .hy-cta-link span[aria-hidden=true]{position:absolute;inset:0}.hy-link-box-container .hy-cta-link:focus{outline:none}.hy-link-box-container .hy-cta-link__icon{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--brand-main-light);display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;height:40px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:40px}.hy-link-box-container .hy-cta-link__icon svg{fill:var(--grayscale-white)}.hy-link-box-container .hy-cta-link__icon--external svg{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.hy-link-box__image-container{margin:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:stretch;-ms-flex-pack:stretch;justify-content:stretch;min-height:10rem;position:relative}.hy-link-box__image-container:before{content:"";display:block;padding-top:62.5%;width:100%}.hy-link-box__image-container img{bottom:0;height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;right:0;top:0;width:100%}.hy-link-box__image-container.is-image-missing svg{position:absolute;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);left:50%;width:85px;height:auto;fill:#d2d2d2}.hy-link-box__text-container{padding:16px}.hy-link-box__text-container__title{font-size:1.3125rem;line-height:28px;font-weight:700;color:var(--brand-main-nearly-black);font-family:var(--main-font-family);letter-spacing:-0.42px;-ms-hyphens:auto;hyphens:auto;word-break:break-word;margin:0 0 16px;text-wrap:balance}@media screen and (min-width: 1024px){.hy-link-box__text-container__title{font-size:1.5625rem;line-height:32px;letter-spacing:-0.5px}}.hy-link-box__text-container__description{font-size:0.9375rem;line-height:22px;color:var(--grayscale-black);font-family:var(--main-font-family);margin:0;text-wrap:pretty}@media screen and (min-width: 1024px){.hy-link-box__text-container__description{font-size:1.0625rem;line-height:26px}}';const l=class{constructor(t){i(this,t),this.headerstyle="common",this.variant=a.default,this.readMoreLabel=void 0,this.dataItems=void 0}async componentWillLoad(){this._dataItems=await o(this.dataItems)}componentDidLoad(){let i=this.el.closest(".hy-main");i&&(i.classList.contains("with-sidebar")||(this.headerstyle="large"))}render(){const i=["hy-link-box-list",this.variant,`hy-link-box-list__${this.variant}`,`hy-link-box-list__${this.headerstyle}`].join(" "),e=[this.variant,`hy-link-box__${this.variant}`].join(" ");return t(n,{key:"e03e2f8c30348873286da0eee4d71593a04f0f41"},t("ul",{key:"8d01eac632b7b94df38f38dd029b329b14569ade",class:i},this._dataItems.map((i=>t("li",null,t("hy-link-box",{class:e,variant:this.variant,"source-set":i.imageSets,"image-url":i.imageUrl,"image-alt":i.imageAlt,"text-title":i.heading,"text-description":i.description,"show-logo":i.showLogo,url:i.boxUrl,"is-external":i.isExternal,"sc-label":i.ariaLabel,"read-more-label":this.readMoreLabel}))))),t("hy-box",{key:"2ed3ba6e604b1976c2d108584606a295c1a3fdbf",mb:"1.75, 1.75, 2, 2.5"}))}get el(){return e(this)}};l.style="*{-webkit-box-sizing:border-box;box-sizing:border-box}:host{display:block}.hy-link-box-list{padding:0;margin:0;list-style:none;display:grid;gap:32px 0}@media screen and (min-width: 768px){.hy-link-box-list{grid-template-columns:repeat(2, 1fr);gap:32px 24px}}@media screen and (min-width: 1024px){.hy-link-box-list{grid-template-columns:repeat(3, 1fr)}}@media screen and (min-width: 1920px){.hy-link-box-list{gap:32px}}";export{s as hy_link_box,l as hy_link_box_list}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcenteratunihelsinki/huds-lib",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.85",
|
|
4
4
|
"description": "Helsinki University Design System library",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"pre-commit": "pretty-quick --staged"
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "bb6cab35fb185991d9121301126693d523ac31ec"
|
|
74
74
|
}
|