@itcenteratunihelsinki/huds-lib 0.8.63 → 0.8.64
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.js +28 -16
- package/components/hy-hero.js.map +1 -1
- package/components/utils.js +8 -0
- package/components/utils.js.map +1 -1
- package/dist/cjs/huds-lib.cjs.js +1 -1
- package/dist/cjs/hy-accordion-container_2.cjs.entry.js +1 -1
- package/dist/cjs/hy-banner.cjs.entry.js +1 -1
- package/dist/cjs/hy-breadcrumbs_15.cjs.entry.js +1 -1
- package/dist/cjs/hy-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/hy-content-list_2.cjs.entry.js +1 -1
- package/dist/cjs/hy-cta-button.cjs.entry.js +1 -1
- package/dist/cjs/hy-cta-link.cjs.entry.js +1 -1
- package/dist/cjs/hy-events.cjs.entry.js +1 -1
- package/dist/cjs/hy-filter-group_6.cjs.entry.js +1 -1
- package/dist/cjs/hy-general-list_2.cjs.entry.js +1 -1
- package/dist/cjs/hy-hero-carousel.cjs.entry.js +1 -1
- package/dist/cjs/hy-hero.cjs.entry.js +27 -17
- package/dist/cjs/hy-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/hy-introduction.cjs.entry.js +1 -1
- package/dist/cjs/hy-key-figure_2.cjs.entry.js +1 -1
- package/dist/cjs/hy-key-highlight_2.cjs.entry.js +1 -1
- package/dist/cjs/hy-large-process-flow_2.cjs.entry.js +1 -1
- package/dist/cjs/hy-link-box_2.cjs.entry.js +1 -1
- package/dist/cjs/hy-link-list.cjs.entry.js +1 -1
- package/dist/cjs/hy-link.cjs.entry.js +1 -1
- package/dist/cjs/hy-list-item.cjs.entry.js +1 -1
- package/dist/cjs/hy-menu-main-group.cjs.entry.js +1 -1
- package/dist/cjs/hy-opening-hours_2.cjs.entry.js +1 -1
- package/dist/cjs/hy-pager_2.cjs.entry.js +1 -1
- package/dist/cjs/hy-person-card.cjs.entry.js +1 -1
- package/dist/cjs/hy-person-profile.cjs.entry.js +1 -1
- package/dist/cjs/hy-process_2.cjs.entry.js +1 -1
- package/dist/cjs/hy-shortcuts.cjs.entry.js +1 -1
- package/dist/cjs/hy-user-login-form.cjs.entry.js +1 -1
- package/dist/cjs/hy-video.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-bfc1127a.js → utils-56f3464c.js} +9 -1
- package/dist/cjs/utils-56f3464c.js.map +1 -0
- package/dist/collection/components/hy-hero/hy-hero.css +282 -4
- package/dist/collection/components/hy-hero/hy-hero.js +66 -16
- package/dist/collection/components/hy-hero/hy-hero.js.map +1 -1
- package/dist/collection/utils/utils.js +8 -0
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/esm/huds-lib.js +1 -1
- package/dist/esm/hy-accordion-container_2.entry.js +1 -1
- package/dist/esm/hy-banner.entry.js +1 -1
- package/dist/esm/hy-breadcrumbs_15.entry.js +1 -1
- package/dist/esm/hy-checkbox.entry.js +1 -1
- package/dist/esm/hy-content-list_2.entry.js +1 -1
- package/dist/esm/hy-cta-button.entry.js +1 -1
- package/dist/esm/hy-cta-link.entry.js +1 -1
- package/dist/esm/hy-events.entry.js +1 -1
- package/dist/esm/hy-filter-group_6.entry.js +1 -1
- package/dist/esm/hy-general-list_2.entry.js +1 -1
- package/dist/esm/hy-hero-carousel.entry.js +1 -1
- package/dist/esm/hy-hero.entry.js +27 -17
- package/dist/esm/hy-hero.entry.js.map +1 -1
- package/dist/esm/hy-introduction.entry.js +1 -1
- package/dist/esm/hy-key-figure_2.entry.js +1 -1
- package/dist/esm/hy-key-highlight_2.entry.js +1 -1
- package/dist/esm/hy-large-process-flow_2.entry.js +1 -1
- package/dist/esm/hy-link-box_2.entry.js +1 -1
- package/dist/esm/hy-link-list.entry.js +1 -1
- package/dist/esm/hy-link.entry.js +1 -1
- package/dist/esm/hy-list-item.entry.js +1 -1
- package/dist/esm/hy-menu-main-group.entry.js +1 -1
- package/dist/esm/hy-opening-hours_2.entry.js +1 -1
- package/dist/esm/hy-pager_2.entry.js +1 -1
- package/dist/esm/hy-person-card.entry.js +1 -1
- package/dist/esm/hy-person-profile.entry.js +1 -1
- package/dist/esm/hy-process_2.entry.js +1 -1
- package/dist/esm/hy-shortcuts.entry.js +1 -1
- package/dist/esm/hy-user-login-form.entry.js +1 -1
- package/dist/esm/hy-video.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-7438924c.js → utils-2819fd7e.js} +9 -1
- package/dist/esm/utils-2819fd7e.js.map +1 -0
- package/dist/huds-lib/huds-lib.esm.js +1 -1
- package/dist/huds-lib/huds-lib.esm.js.map +1 -1
- package/dist/huds-lib/hy-accordion-container_2.entry.js +1 -1
- package/dist/huds-lib/hy-banner.entry.js +1 -1
- package/dist/huds-lib/hy-breadcrumbs_15.entry.js +1 -1
- package/dist/huds-lib/hy-checkbox.entry.js +1 -1
- package/dist/huds-lib/hy-content-list_2.entry.js +1 -1
- package/dist/huds-lib/hy-cta-button.entry.js +1 -1
- package/dist/huds-lib/hy-cta-link.entry.js +1 -1
- package/dist/huds-lib/hy-events.entry.js +1 -1
- package/dist/huds-lib/hy-filter-group_6.entry.js +1 -1
- package/dist/huds-lib/hy-general-list_2.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-hero.entry.js.map +1 -1
- package/dist/huds-lib/hy-introduction.entry.js +1 -1
- package/dist/huds-lib/hy-key-figure_2.entry.js +1 -1
- package/dist/huds-lib/hy-key-highlight_2.entry.js +1 -1
- package/dist/huds-lib/hy-large-process-flow_2.entry.js +1 -1
- package/dist/huds-lib/hy-link-box_2.entry.js +1 -1
- package/dist/huds-lib/hy-link-list.entry.js +1 -1
- package/dist/huds-lib/hy-link.entry.js +1 -1
- package/dist/huds-lib/hy-list-item.entry.js +1 -1
- package/dist/huds-lib/hy-menu-main-group.entry.js +1 -1
- package/dist/huds-lib/hy-opening-hours_2.entry.js +1 -1
- package/dist/huds-lib/hy-pager_2.entry.js +1 -1
- package/dist/huds-lib/hy-person-card.entry.js +1 -1
- package/dist/huds-lib/hy-person-profile.entry.js +1 -1
- package/dist/huds-lib/hy-process_2.entry.js +1 -1
- package/dist/huds-lib/hy-shortcuts.entry.js +1 -1
- package/dist/huds-lib/hy-user-login-form.entry.js +1 -1
- package/dist/huds-lib/hy-video.entry.js +1 -1
- package/dist/huds-lib/utils-2819fd7e.js +2 -0
- package/dist/huds-lib/utils-2819fd7e.js.map +1 -0
- package/dist/types/components/hy-hero/hy-hero.d.ts +7 -1
- package/dist/types/components.d.ts +6 -2
- package/dist/types/utils/utils.d.ts +8 -1
- package/package.json +2 -2
- package/dist/cjs/utils-bfc1127a.js.map +0 -1
- package/dist/esm/utils-7438924c.js.map +0 -1
- package/dist/huds-lib/utils-7438924c.js +0 -2
- package/dist/huds-lib/utils-7438924c.js.map +0 -1
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
@media (min-width: 60rem) {
|
|
70
|
-
.hy-hero {
|
|
70
|
+
.hy-hero:not(.hy-hero--full-image) {
|
|
71
71
|
margin-top: 32px;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
@media (min-width: 75.0625rem) {
|
|
82
|
-
.without-sidebar .hy-hero {
|
|
82
|
+
.without-sidebar .hy-hero:not(.hy-hero--full-image) {
|
|
83
83
|
max-width: 1216px;
|
|
84
84
|
margin-right: auto;
|
|
85
85
|
margin-left: auto;
|
|
@@ -87,14 +87,14 @@
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
@media (min-width: 75.0625rem) {
|
|
90
|
-
.with-sidebar .hy-hero {
|
|
90
|
+
.with-sidebar:not(.hy-hero--full-image) .hy-hero {
|
|
91
91
|
padding-left: 32px;
|
|
92
92
|
padding-right: 32px;
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
@media (min-width: 1601px) {
|
|
97
|
-
.with-sidebar .hy-hero {
|
|
97
|
+
.with-sidebar:not(.hy-hero--full-image) .hy-hero {
|
|
98
98
|
padding-right: 0;
|
|
99
99
|
padding-left: 0;
|
|
100
100
|
max-width: 1216px;
|
|
@@ -103,6 +103,284 @@
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
.hy-hero--full-image {
|
|
107
|
+
--dark-bg: rgba(0, 0, 0, 0.55);
|
|
108
|
+
--light-bg: rgba(255, 255, 255, 0.50);
|
|
109
|
+
--dark-text: var(--brand-main-nearly-black);
|
|
110
|
+
--light-text: var(--grayscale-white);
|
|
111
|
+
border-bottom: 1px solid var(--grayscale-medium-dark);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@media (min-width: 60rem) {
|
|
115
|
+
.hy-hero--full-image {
|
|
116
|
+
border-bottom: 4px solid var(--grayscale-black);
|
|
117
|
+
margin-left: -2rem;
|
|
118
|
+
margin-right: -2rem;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.hy-hero--full-image .hy-hero__container {
|
|
123
|
+
grid-template-columns: repeat(4, 1fr);
|
|
124
|
+
grid-template-rows: 1fr;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.hy-hero--full-image .hy-hero__image-container {
|
|
128
|
+
grid-column: 1/-1;
|
|
129
|
+
grid-row: 1/-1;
|
|
130
|
+
-o-object-fit: cover;
|
|
131
|
+
object-fit: cover;
|
|
132
|
+
padding: 0;
|
|
133
|
+
width: 100%;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.hy-hero--full-image .hy-hero__image-container img {
|
|
137
|
+
aspect-ratio: 16/8;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.hy-hero--full-image .hy-hero__content-container {
|
|
141
|
+
padding: 0;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@media (min-width: 60rem) {
|
|
145
|
+
.hy-hero--full-image .hy-hero__content-container {
|
|
146
|
+
align-self: center;
|
|
147
|
+
grid-column: 1/3;
|
|
148
|
+
grid-row: 1/-1;
|
|
149
|
+
margin-left: 32px;
|
|
150
|
+
max-width: 95%;
|
|
151
|
+
z-index: 2;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
@media (min-width: 75.0625rem) {
|
|
156
|
+
.hy-hero--full-image .hy-hero__content-container {
|
|
157
|
+
margin-left: 0;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.hy-hero--full-image .hy-hero__content {
|
|
162
|
+
display: -webkit-box;
|
|
163
|
+
display: -ms-flexbox;
|
|
164
|
+
display: flex;
|
|
165
|
+
-webkit-box-orient: vertical;
|
|
166
|
+
-webkit-box-direction: normal;
|
|
167
|
+
-ms-flex-direction: column;
|
|
168
|
+
flex-direction: column;
|
|
169
|
+
gap: 24px;
|
|
170
|
+
padding: 16px 16px 32px 16px;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
@media (min-width: 60rem) {
|
|
174
|
+
.hy-hero--full-image .hy-hero__content {
|
|
175
|
+
margin-left: 32px;
|
|
176
|
+
gap: 24px;
|
|
177
|
+
padding: 32px;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@media (min-width: 75.0625rem) {
|
|
182
|
+
.hy-hero--full-image .hy-hero__content {
|
|
183
|
+
margin-left: 64px;
|
|
184
|
+
gap: 32px;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
@media (min-width: 1601px) {
|
|
189
|
+
.hy-hero--full-image .hy-hero__content {
|
|
190
|
+
margin-left: 96px;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.hy-hero--full-image .hy-hero__content[data-text-color=dark_text_light_bg] {
|
|
195
|
+
-webkit-backdrop-filter: blur(250px);
|
|
196
|
+
backdrop-filter: blur(250px);
|
|
197
|
+
background-color: var(--grayscale-white);
|
|
198
|
+
color: var(--dark-text);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
@media (min-width: 60rem) {
|
|
202
|
+
.hy-hero--full-image .hy-hero__content[data-text-color=dark_text_light_bg] {
|
|
203
|
+
background: var(--light-bg);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.hy-hero--full-image .hy-hero__content[data-text-color=light_text_dark_bg] {
|
|
208
|
+
-webkit-backdrop-filter: blur(250px);
|
|
209
|
+
backdrop-filter: blur(250px);
|
|
210
|
+
background: var(--grayscale-black);
|
|
211
|
+
color: var(--light-text);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
@media (min-width: 60rem) {
|
|
215
|
+
.hy-hero--full-image .hy-hero__content[data-text-color=light_text_dark_bg] {
|
|
216
|
+
background: var(--dark-bg);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.hy-hero--full-image .hy-hero__content[data-text-color=dark_text_no_bg] {
|
|
221
|
+
background-color: var(--grayscale-white);
|
|
222
|
+
color: var(--dark-text);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
@media (min-width: 60rem) {
|
|
226
|
+
.hy-hero--full-image .hy-hero__content[data-text-color=dark_text_no_bg] {
|
|
227
|
+
background: transparent;
|
|
228
|
+
text-shadow: 0 0 5px var(--grayscale-white);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.hy-hero--full-image .hy-hero__content[data-text-color=light_text_no_bg] {
|
|
233
|
+
background-color: var(--grayscale-black);
|
|
234
|
+
color: var(--light-text);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
@media (min-width: 60rem) {
|
|
238
|
+
.hy-hero--full-image .hy-hero__content[data-text-color=light_text_no_bg] {
|
|
239
|
+
background: transparent;
|
|
240
|
+
text-shadow: 0 0 5px var(--grayscale-black);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.hy-hero--full-image .hy-hero__subtitle {
|
|
245
|
+
font-family: var(--main-font-family);
|
|
246
|
+
font-size: 18px;
|
|
247
|
+
font-weight: 700;
|
|
248
|
+
line-height: 1.2;
|
|
249
|
+
position: relative;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.hy-hero--full-image .hy-hero__subtitle::after {
|
|
253
|
+
aspect-ratio: 1;
|
|
254
|
+
background-color: currentColor;
|
|
255
|
+
bottom: -10px;
|
|
256
|
+
content: "";
|
|
257
|
+
display: block;
|
|
258
|
+
height: 4px;
|
|
259
|
+
left: 0;
|
|
260
|
+
position: absolute;
|
|
261
|
+
width: 64px;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
@media (min-width: 60rem) {
|
|
265
|
+
.hy-hero--full-image .hy-hero__subtitle {
|
|
266
|
+
font-size: 20px;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.hy-hero--full-image h2.hy-hero__title.hy-heading__hero {
|
|
271
|
+
color: inherit !important;
|
|
272
|
+
font-family: var(--main-font-family);
|
|
273
|
+
font-size: 32px;
|
|
274
|
+
font-weight: 700;
|
|
275
|
+
line-height: 1.2;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
@media (min-width: 75.0625rem) {
|
|
279
|
+
.hy-hero--full-image h2.hy-hero__title.hy-heading__hero {
|
|
280
|
+
font-size: 36px;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
@media (min-width: 1601px) {
|
|
285
|
+
.hy-hero--full-image h2.hy-hero__title.hy-heading__hero {
|
|
286
|
+
font-size: 64px;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.hy-hero--full-image .hy-hero__description {
|
|
291
|
+
font-family: var(--main-font-family);
|
|
292
|
+
font-size: 16px;
|
|
293
|
+
font-weight: 400;
|
|
294
|
+
line-height: 1.5;
|
|
295
|
+
margin: 0;
|
|
296
|
+
padding: 0;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
@media (min-width: 1601px) {
|
|
300
|
+
.hy-hero--full-image .hy-hero__description {
|
|
301
|
+
font-size: 17px;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.hy-hero--full-image .hy-hero__actions {
|
|
306
|
+
margin: 0;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.hy-hero--full-image .hy-hero__actions .hy-hero__link {
|
|
310
|
+
--light-bg: var(--grayscale-white);
|
|
311
|
+
--dark-bg: var(--grayscale-black);
|
|
312
|
+
--light-text: var(--grayscale-white);
|
|
313
|
+
--dark-text: var(--grayscale-black);
|
|
314
|
+
-webkit-box-align: center;
|
|
315
|
+
-ms-flex-align: center;
|
|
316
|
+
align-items: center;
|
|
317
|
+
display: -webkit-box;
|
|
318
|
+
display: -ms-flexbox;
|
|
319
|
+
display: flex;
|
|
320
|
+
font-family: var(--main-font-family);
|
|
321
|
+
font-size: 16px;
|
|
322
|
+
font-weight: 700;
|
|
323
|
+
gap: 8px;
|
|
324
|
+
line-height: 18px;
|
|
325
|
+
padding: 13px 16px;
|
|
326
|
+
text-decoration: none;
|
|
327
|
+
width: -webkit-fit-content;
|
|
328
|
+
width: -moz-fit-content;
|
|
329
|
+
width: fit-content;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.hy-hero--full-image .hy-hero__actions .hy-hero__link:hover {
|
|
333
|
+
text-decoration: underline;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.hy-hero--full-image .hy-hero__actions .hy-hero__link svg {
|
|
337
|
+
width: 16px;
|
|
338
|
+
height: 16px;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=dark_text_light_bg] {
|
|
342
|
+
background: var(--dark-bg);
|
|
343
|
+
color: var(--light-text);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=dark_text_light_bg] svg {
|
|
347
|
+
fill: var(--light-text);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=light_text_dark_bg] {
|
|
351
|
+
background: var(--light-bg);
|
|
352
|
+
color: var(--dark-text);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=light_text_dark_bg] svg {
|
|
356
|
+
fill: var(--dark-text);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=dark_text_no_bg] {
|
|
360
|
+
background: var(--dark-bg);
|
|
361
|
+
color: var(--light-text);
|
|
362
|
+
text-shadow: none;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=dark_text_no_bg] svg {
|
|
366
|
+
fill: var(--light-text);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=light_text_no_bg] {
|
|
370
|
+
background: var(--light-bg);
|
|
371
|
+
color: var(--dark-text);
|
|
372
|
+
text-shadow: none;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.hy-hero--full-image .hy-hero__actions .hy-hero__link[data-text-color=light_text_no_bg] svg {
|
|
376
|
+
fill: var(--dark-text);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.hy-hero--full-image .hy-image__image {
|
|
380
|
+
-o-object-fit: cover;
|
|
381
|
+
object-fit: cover;
|
|
382
|
+
}
|
|
383
|
+
|
|
106
384
|
@media (min-width: 60rem) {
|
|
107
385
|
.hy-hero--white {
|
|
108
386
|
margin-top: 0;
|
|
@@ -9,6 +9,7 @@ export class HyHero {
|
|
|
9
9
|
this.heroGroupType = HeroGroupTypeVariant.default;
|
|
10
10
|
this.colorVariant = HeroColorVariant.blue;
|
|
11
11
|
this.sizeVariant = HeroSizeVariant.large;
|
|
12
|
+
this.heroTextColor = null;
|
|
12
13
|
this.image = undefined;
|
|
13
14
|
this.imageHeight = null;
|
|
14
15
|
this.imageWidth = null;
|
|
@@ -17,6 +18,7 @@ export class HyHero {
|
|
|
17
18
|
this.hasShortcuts = false;
|
|
18
19
|
this.heading = undefined;
|
|
19
20
|
this.description = undefined;
|
|
21
|
+
this.subtitle = undefined;
|
|
20
22
|
this.url = undefined;
|
|
21
23
|
this.urlTitle = undefined;
|
|
22
24
|
this.scLabel = undefined;
|
|
@@ -26,6 +28,7 @@ export class HyHero {
|
|
|
26
28
|
async componentWillLoad() {
|
|
27
29
|
this._sourceSet = await jsonParserWorker(this.sourceSet);
|
|
28
30
|
}
|
|
31
|
+
// TODO: Refactor, find way to get rid of this.
|
|
29
32
|
handleHeroImageObjectFitValue(heroSizeVariant, heroElement) {
|
|
30
33
|
const heroContentContainerElement = heroElement.getElementsByClassName("hy-hero__content-container")[0];
|
|
31
34
|
if (heroSizeVariant === "small") {
|
|
@@ -45,10 +48,23 @@ export class HyHero {
|
|
|
45
48
|
}
|
|
46
49
|
}
|
|
47
50
|
}
|
|
51
|
+
createImageElement(props, srcSet, aspectRatio) {
|
|
52
|
+
return (h("div", { class: `hy-hero__image-container`, style: aspectRatio }, props.image &&
|
|
53
|
+
(srcSet ? (h("picture", null, srcSet.map((item) => (h("source", { srcSet: item.src, media: item.media, type: item.type, sizes: item.sizes ? item.sizes : "" }))), h("img", { loading: props.disableLazy ? "eager" : "lazy", alt: props.imageAltText, class: `hy-image__image`, src: props.image, height: props.imageHeight, width: props.imageWidth }))) : (h("img", { loading: props.disableLazy ? "eager" : "lazy", alt: props.imageAltText, class: `hy-image__image`, src: props.image, height: props.imageHeight, width: props.imageWidth })))));
|
|
54
|
+
}
|
|
55
|
+
// TODO: Refactor, is this still even used?
|
|
56
|
+
setAspectRatio(aspectRatioWidth = 16, aspectRatioHeight = 10) {
|
|
57
|
+
const aspect = (aspectRatioHeight / aspectRatioWidth) * 100;
|
|
58
|
+
return {
|
|
59
|
+
"--aspectRatio": `${aspect}%`,
|
|
60
|
+
//"aspect-ratio": `${aspectRatioWidth} / ${aspectRatioHeight}` as "aspectRatio",
|
|
61
|
+
};
|
|
62
|
+
}
|
|
48
63
|
render() {
|
|
49
64
|
let variant = CtaLinkButtonVariants.heroWhite;
|
|
50
65
|
let colorVariantValue = this.colorVariant;
|
|
51
66
|
let heroTypeValue = this.heroType;
|
|
67
|
+
//TODO: Refactor
|
|
52
68
|
if (this.heroType === "minor_landing") {
|
|
53
69
|
colorVariantValue = HeroColorVariant.white;
|
|
54
70
|
heroTypeValue = HeroTypeVariant.landing;
|
|
@@ -68,18 +84,10 @@ export class HyHero {
|
|
|
68
84
|
`hy-hero--${this.heroGroupType}`,
|
|
69
85
|
`hy-hero--${colorVariantValue}`,
|
|
70
86
|
`hy-hero--${this.sizeVariant}`,
|
|
87
|
+
this.hasShortcuts ? 'has-shortcuts' : '',
|
|
71
88
|
];
|
|
72
89
|
const heroTitleClasses = ["hy-hero__title", "hy-heading__hero"].join(" ");
|
|
73
|
-
//
|
|
74
|
-
if (this.hasShortcuts) {
|
|
75
|
-
hyHeroClasses.push("has-shortcuts");
|
|
76
|
-
}
|
|
77
|
-
const aspectRatioWidth = 16;
|
|
78
|
-
const aspectRatioHeight = 10;
|
|
79
|
-
const aspect = (aspectRatioHeight / aspectRatioWidth) * 100;
|
|
80
|
-
const aspectRatio = {
|
|
81
|
-
"--aspectRatio": `${aspect}%`,
|
|
82
|
-
};
|
|
90
|
+
// TODO: Refactor, find way to get rid of this.
|
|
83
91
|
window.onload = () => {
|
|
84
92
|
const heroElement = document.getElementsByClassName("hy-hero")[0];
|
|
85
93
|
this.handleHeroImageObjectFitValue(this.sizeVariant, heroElement);
|
|
@@ -88,12 +96,14 @@ export class HyHero {
|
|
|
88
96
|
timeout = setTimeout(() => this.handleHeroImageObjectFitValue(this.sizeVariant, heroElement), delay);
|
|
89
97
|
});
|
|
90
98
|
};
|
|
91
|
-
if (heroTypeValue === "front_page") {
|
|
92
|
-
return (h(Host, null, h("div", { class: hyHeroClasses.join(" ") }, h("div", { class: `hy-hero__container` }, h("div", { class: `hy-
|
|
93
|
-
|
|
99
|
+
if (heroTypeValue === "front_page" && this.sizeVariant !== 'full-image') {
|
|
100
|
+
return (h(Host, null, h("div", { class: hyHeroClasses.join(" ") }, h("div", { class: `hy-hero__container` }, this.createImageElement(this, this._sourceSet, this.setAspectRatio()), h("div", { class: `hy-hero__spacer-box` }), h("div", { class: `hy-hero__content-container` }, h("div", { class: `hy-hero__content` }, h("div", { class: `hy-hero__title-container` }, h("h2", { innerHTML: this.heading, class: heroTitleClasses })), this.description && h("p", { class: `hy-hero__description` }, this.description), this.url && (h("div", { class: `hy-hero__actions` }, h("hy-cta-button", { "link-content": this.urlTitle, "sc-label": this.scLabel, url: this.url, "is-external": this.isExternal, variant: variant }))))))), h("hy-box", { mb: "2, 2, 1, 1" })));
|
|
101
|
+
}
|
|
102
|
+
if (this.sizeVariant === 'full-image') {
|
|
103
|
+
const linkTarget = this.isExternal ? '_blank' : '_self';
|
|
104
|
+
return (h("div", { class: `hy-hero hy-hero--full-image` }, h("div", { class: `hy-hero__container` }, this.createImageElement(this, this._sourceSet, this.setAspectRatio(16, 8)), h("div", { class: `hy-hero__content-container` }, h("div", { class: `hy-hero__content`, "data-text-color": this.heroTextColor }, this.subtitle && h("span", { class: `hy-hero__subtitle` }, this.subtitle), h("h2", { innerHTML: this.heading, class: heroTitleClasses }), this.description && h("p", { class: `hy-hero__description` }, this.description), this.url && (h("div", { class: `hy-hero__actions` }, h("a", { class: "hy-hero__link", href: this.url, "aria-label": this.scLabel, target: linkTarget, "data-text-color": this.heroTextColor }, this.urlTitle, h("hy-icon", { icon: "hy-icon-arrow-right", size: 16 })))))))));
|
|
94
105
|
}
|
|
95
|
-
return (h(Host, null, h("div", { class: hyHeroClasses.join(" ") }, h("div", { class: `hy-hero__container` }, h("div", { class: `hy-
|
|
96
|
-
(this._sourceSet ? (h("picture", null, this._sourceSet.map((item) => (h("source", { srcSet: item.src, media: item.media, type: item.type, sizes: item.sizes ? item.sizes : "" }))), h("img", { loading: this.disableLazy ? "eager" : "lazy", alt: this.imageAltText, class: `hy-image__image`, src: this.image, height: this.imageHeight, width: this.imageWidth }))) : (h("img", { loading: this.disableLazy ? "eager" : "lazy", alt: this.imageAltText, class: `hy-image__image`, src: this.image, height: this.imageHeight, width: this.imageWidth })))), h("div", { class: `hy-hero__content-container` }, h("div", { class: `hy-hero__content` }, h("div", { class: `hy-hero__title-container` }, h("h2", { innerHTML: this.heading, class: heroTitleClasses })), this.description && h("p", { class: `hy-hero__description` }, this.description), this.url && (h("div", { class: `hy-hero__actions` }, h("hy-cta-button", { "link-content": this.urlTitle, "sc-label": this.scLabel, url: this.url, "is-external": this.isExternal, variant: variant }))))))), h("hy-box", { mb: "2, 2, 1, 1" })));
|
|
106
|
+
return (h(Host, null, h("div", { class: hyHeroClasses.join(" ") }, h("div", { class: `hy-hero__container` }, this.createImageElement(this, this._sourceSet, this.setAspectRatio()), h("div", { class: `hy-hero__content-container` }, h("div", { class: `hy-hero__content` }, h("div", { class: `hy-hero__title-container` }, h("h2", { innerHTML: this.heading, class: heroTitleClasses })), this.description && h("p", { class: `hy-hero__description` }, this.description), this.url && (h("div", { class: `hy-hero__actions` }, h("hy-cta-button", { "link-content": this.urlTitle, "sc-label": this.scLabel, url: this.url, "is-external": this.isExternal, variant: variant }))))))), h("hy-box", { mb: "2, 2, 1, 1" })));
|
|
97
107
|
}
|
|
98
108
|
static get is() { return "hy-hero"; }
|
|
99
109
|
static get originalStyleUrls() {
|
|
@@ -182,7 +192,7 @@ export class HyHero {
|
|
|
182
192
|
"mutable": false,
|
|
183
193
|
"complexType": {
|
|
184
194
|
"original": "HeroSizeVariant",
|
|
185
|
-
"resolved": "HeroSizeVariant.large | HeroSizeVariant.small",
|
|
195
|
+
"resolved": "HeroSizeVariant.fullImage | HeroSizeVariant.large | HeroSizeVariant.small",
|
|
186
196
|
"references": {
|
|
187
197
|
"HeroSizeVariant": {
|
|
188
198
|
"location": "import",
|
|
@@ -200,6 +210,29 @@ export class HyHero {
|
|
|
200
210
|
"reflect": false,
|
|
201
211
|
"defaultValue": "HeroSizeVariant.large"
|
|
202
212
|
},
|
|
213
|
+
"heroTextColor": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"mutable": false,
|
|
216
|
+
"complexType": {
|
|
217
|
+
"original": "HeroTextColor",
|
|
218
|
+
"resolved": "HeroTextColor.dark_text_light_bg | HeroTextColor.dark_text_no_bg | HeroTextColor.light_text_dark_bg | HeroTextColor.light_text_no_bg",
|
|
219
|
+
"references": {
|
|
220
|
+
"HeroTextColor": {
|
|
221
|
+
"location": "import",
|
|
222
|
+
"path": "../../utils/utils"
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"required": false,
|
|
227
|
+
"optional": false,
|
|
228
|
+
"docs": {
|
|
229
|
+
"tags": [],
|
|
230
|
+
"text": ""
|
|
231
|
+
},
|
|
232
|
+
"attribute": "hero-text-color",
|
|
233
|
+
"reflect": false,
|
|
234
|
+
"defaultValue": "null"
|
|
235
|
+
},
|
|
203
236
|
"image": {
|
|
204
237
|
"type": "string",
|
|
205
238
|
"mutable": false,
|
|
@@ -341,6 +374,23 @@ export class HyHero {
|
|
|
341
374
|
"attribute": "description",
|
|
342
375
|
"reflect": false
|
|
343
376
|
},
|
|
377
|
+
"subtitle": {
|
|
378
|
+
"type": "string",
|
|
379
|
+
"mutable": false,
|
|
380
|
+
"complexType": {
|
|
381
|
+
"original": "string",
|
|
382
|
+
"resolved": "string",
|
|
383
|
+
"references": {}
|
|
384
|
+
},
|
|
385
|
+
"required": false,
|
|
386
|
+
"optional": false,
|
|
387
|
+
"docs": {
|
|
388
|
+
"tags": [],
|
|
389
|
+
"text": ""
|
|
390
|
+
},
|
|
391
|
+
"attribute": "subtitle",
|
|
392
|
+
"reflect": false
|
|
393
|
+
},
|
|
344
394
|
"url": {
|
|
345
395
|
"type": "string",
|
|
346
396
|
"mutable": false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hy-hero.js","sourceRoot":"","sources":["../../../src/components/hy-hero/hy-hero.tsx"],"names":[],"mappings":"AAMA,IAAI,OAAO,GAAG,IAAI,CAAC;AACnB,IAAI,KAAK,GAAG,GAAG,CAAC;AAEhB,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AAChE,OAAO,EAAC,gBAAgB,EAAC,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAO3B,MAAM,OAAO,MAAM;;oBAEmB,eAAe,CAAC,OAAO;yBACb,oBAAoB,CAAC,OAAO;wBACjC,gBAAgB,CAAC,IAAI;uBACvB,eAAe,CAAC,KAAK;;uBAE9B,IAAI;sBACL,IAAI;wBACF,EAAE;uBACF,KAAK;wBACJ,KAAK;;;;;;sBAMP,KAAK;;;EAInC,KAAK,CAAC,iBAAiB;IACrB,IAAI,CAAC,UAAU,GAAG,MAAM,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;EAC3D,CAAC;EAED,6BAA6B,CAAC,eAAe,EAAE,WAAW;IACxD,MAAM,2BAA2B,GAAG,WAAW,CAAC,sBAAsB,CACpE,4BAA4B,CAC7B,CAAC,CAAC,CAAgB,CAAC;IAEpB,IAAI,eAAe,KAAK,OAAO,EAAE;MAC/B,IAAI,2BAA2B,CAAC,YAAY,IAAI,GAAG,EAAE;QACnD,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;OACxC;WAAM;QACL,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAA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cAC5B,WAAK,KAAK,EAAE,0BAA0B;gBACpC,UAAI,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,gBAAgB,GAAO,CACvD;cACL,IAAI,CAAC,WAAW,IAAI,SAAG,KAAK,EAAE,sBAAsB,IAAG,IAAI,CAAC,WAAW,CAAK;cAC5E,IAAI,CAAC,GAAG,IAAI,CACX,WAAK,KAAK,EAAE,kBAAkB;gBAC5B,qCACgB,IAAI,CAAC,QAAQ,cACjB,IAAI,CAAC,OAAO,EACtB,GAAG,EAAE,IAAI,CAAC,GAAG,iBACA,IAAI,CAAC,UAAU,EAC5B,OAAO,EAAE,OAAO,GAChB,CACE,CACP,CACG,CACF,CACF,CACF;MACN,cAAQ,EAAE,EAAC,YAAY,GAAG,CACrB,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["export interface ImageSrcSet {\n src: any;\n media: string;\n type: string;\n sizes: string | null;\n}\nlet timeout = null;\nlet delay = 250;\n\nimport {Component, Element, h, Host, Prop} from \"@stencil/core\";\nimport {jsonParserWorker} from \"../../global/globalScript\";\nimport {\n CtaLinkButtonVariants,\n HeroColorVariant,\n HeroSizeVariant,\n HeroGroupTypeVariant,\n HeroTypeVariant,\n} from \"../../utils/utils\";\n\n@Component({\n tag: \"hy-hero\",\n styleUrl: \"hy-hero.scss\",\n shadow: false,\n})\nexport class HyHero {\n @Element() el: HTMLElement;\n @Prop() heroType: HeroTypeVariant = HeroTypeVariant.landing;\n @Prop() heroGroupType: HeroGroupTypeVariant = HeroGroupTypeVariant.default;\n @Prop() colorVariant: HeroColorVariant = HeroColorVariant.blue;\n @Prop() sizeVariant: HeroSizeVariant = HeroSizeVariant.large;\n @Prop() image: string;\n @Prop() imageHeight: number = null;\n @Prop() imageWidth: number = null;\n @Prop() imageAltText: string = \"\";\n @Prop() disableLazy: boolean = false;\n @Prop() hasShortcuts: boolean = false;\n @Prop() heading: string;\n @Prop() description: string;\n @Prop() url: string;\n @Prop() urlTitle: string;\n @Prop() scLabel?: string;\n @Prop() isExternal: boolean = false;\n private _sourceSet: ImageSrcSet[];\n @Prop() sourceSet: ImageSrcSet[] | string;\n\n async componentWillLoad() {\n this._sourceSet = await jsonParserWorker(this.sourceSet);\n }\n\n handleHeroImageObjectFitValue(heroSizeVariant, heroElement) {\n const heroContentContainerElement = heroElement.getElementsByClassName(\n \"hy-hero__content-container\"\n )[0] as HTMLElement;\n\n if (heroSizeVariant === \"small\") {\n if (heroContentContainerElement.offsetHeight >= 300) {\n heroElement.classList.add(\"has-cover\");\n } else {\n heroElement.classList.remove(\"has-cover\");\n }\n }\n\n if (heroSizeVariant === \"large\") {\n if (heroContentContainerElement.offsetHeight >= 344) {\n heroElement.classList.add(\"has-cover\");\n } else {\n heroElement.classList.remove(\"has-cover\");\n }\n }\n }\n\n render() {\n let variant = CtaLinkButtonVariants.heroWhite;\n let colorVariantValue = this.colorVariant;\n let heroTypeValue = this.heroType;\n\n if (this.heroType === \"minor_landing\") {\n colorVariantValue = HeroColorVariant.white;\n heroTypeValue = HeroTypeVariant.landing;\n }\n\n if (colorVariantValue === HeroColorVariant.blue) {\n variant = CtaLinkButtonVariants.heroBlue;\n }\n\n if (colorVariantValue === HeroColorVariant.black) {\n variant = CtaLinkButtonVariants.heroBlack;\n }\n\n if (!colorVariantValue || colorVariantValue === \"fp_white\") {\n colorVariantValue = HeroColorVariant.white;\n }\n\n const hyHeroClasses = [\n \"hy-hero\",\n `hy-hero--${heroTypeValue}`,\n `hy-hero--${this.heroGroupType}`,\n `hy-hero--${colorVariantValue}`,\n `hy-hero--${this.sizeVariant}`,\n ];\n\n const heroTitleClasses = [\"hy-hero__title\", \"hy-heading__hero\"].join(\" \");\n\n // If there is a Shortcuts block after hero, add the class 'shortcuts' to remove underline.\n if (this.hasShortcuts) {\n hyHeroClasses.push(\"has-shortcuts\");\n }\n\n const aspectRatioWidth = 16;\n const aspectRatioHeight = 10;\n const aspect = (aspectRatioHeight / aspectRatioWidth) * 100;\n const aspectRatio = {\n \"--aspectRatio\": `${aspect}%` as \"aspectRatio\",\n };\n\n window.onload = () => {\n const heroElement = document.getElementsByClassName(\"hy-hero\")[0] as HTMLElement;\n this.handleHeroImageObjectFitValue(this.sizeVariant, heroElement);\n window.addEventListener(\"resize\", () => {\n clearTimeout(timeout);\n timeout = setTimeout(() => this.handleHeroImageObjectFitValue(this.sizeVariant, heroElement), delay);\n });\n };\n\n if (heroTypeValue === \"front_page\") {\n return (\n <Host>\n <div class={hyHeroClasses.join(\" \")}>\n <div class={`hy-hero__container`}>\n <div class={`hy-hero__image-container`} style={aspectRatio}>\n {this.image &&\n (this._sourceSet ? (\n <picture>\n {this._sourceSet.map((item) => (\n <source\n srcSet={item.src}\n media={item.media}\n type={item.type}\n sizes={item.sizes ? item.sizes : \"\"}\n />\n ))}\n <img\n loading={this.disableLazy ? \"eager\" : \"lazy\"}\n alt={this.imageAltText}\n class={`hy-image__image`}\n src={this.image}\n height={this.imageHeight}\n width={this.imageWidth}\n />\n </picture>\n ) : (\n <img\n loading={this.disableLazy ? \"eager\" : \"lazy\"}\n alt={this.imageAltText}\n class={`hy-image__image`}\n src={this.image}\n height={this.imageHeight}\n width={this.imageWidth}\n />\n ))}\n </div>\n <div class={`hy-hero__spacer-box`}></div>\n <div class={`hy-hero__content-container`}>\n <div class={`hy-hero__content`}>\n <div class={`hy-hero__title-container`}>\n <h2 innerHTML={this.heading} class={heroTitleClasses}></h2>\n </div>\n {this.description && <p class={`hy-hero__description`}>{this.description}</p>}\n {this.url && (\n <div class={`hy-hero__actions`}>\n <hy-cta-button\n link-content={this.urlTitle}\n sc-label={this.scLabel}\n url={this.url}\n is-external={this.isExternal}\n variant={variant}\n />\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n <hy-box mb=\"2, 2, 1, 1\" />\n </Host>\n );\n }\n\n return (\n <Host>\n <div class={hyHeroClasses.join(\" \")}>\n <div class={`hy-hero__container`}>\n <div class={`hy-hero__image-container`} style={aspectRatio}>\n {this.image &&\n (this._sourceSet ? (\n <picture>\n {this._sourceSet.map((item) => (\n <source\n srcSet={item.src}\n media={item.media}\n type={item.type}\n sizes={item.sizes ? item.sizes : \"\"}\n />\n ))}\n <img\n loading={this.disableLazy ? \"eager\" : \"lazy\"}\n alt={this.imageAltText}\n class={`hy-image__image`}\n src={this.image}\n height={this.imageHeight}\n width={this.imageWidth}\n />\n </picture>\n ) : (\n <img\n loading={this.disableLazy ? \"eager\" : \"lazy\"}\n alt={this.imageAltText}\n class={`hy-image__image`}\n src={this.image}\n height={this.imageHeight}\n width={this.imageWidth}\n />\n ))}\n </div>\n <div class={`hy-hero__content-container`}>\n <div class={`hy-hero__content`}>\n <div class={`hy-hero__title-container`}>\n <h2 innerHTML={this.heading} class={heroTitleClasses}></h2>\n </div>\n {this.description && <p class={`hy-hero__description`}>{this.description}</p>}\n {this.url && (\n <div class={`hy-hero__actions`}>\n <hy-cta-button\n link-content={this.urlTitle}\n sc-label={this.scLabel}\n url={this.url}\n is-external={this.isExternal}\n variant={variant}\n />\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n <hy-box mb=\"2, 2, 1, 1\" />\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"hy-hero.js","sourceRoot":"","sources":["../../../src/components/hy-hero/hy-hero.tsx"],"names":[],"mappings":"AAMA,IAAI,OAAO,GAA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IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC;UACtE,WAAK,KAAK,EAAE,4BAA4B;YACtC,WAAK,KAAK,EAAE,kBAAkB;cAC5B,WAAK,KAAK,EAAE,0BAA0B;gBACpC,UAAI,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,gBAAgB,GAAO,CACvD;cACL,IAAI,CAAC,WAAW,IAAI,SAAG,KAAK,EAAE,sBAAsB,IAAG,IAAI,CAAC,WAAW,CAAK;cAC5E,IAAI,CAAC,GAAG,IAAI,CACX,WAAK,KAAK,EAAE,kBAAkB;gBAC5B,qCACgB,IAAI,CAAC,QAAQ,cACjB,IAAI,CAAC,OAAO,EACtB,GAAG,EAAE,IAAI,CAAC,GAAG,iBACA,IAAI,CAAC,UAAU,EAC5B,OAAO,EAAE,OAAO,GAChB,CACE,CACP,CACG,CACF,CACF,CACF;MACN,cAAQ,EAAE,EAAC,YAAY,GAAG,CACrB,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["export interface ImageSrcSet {\n src: any;\n media: string;\n type: string;\n sizes: string | null;\n}\nlet timeout = null;\nlet delay = 250;\n\nimport {Component, Element, h, Host, Prop} from \"@stencil/core\";\nimport {jsonParserWorker} from \"../../global/globalScript\";\nimport {\n CtaLinkButtonVariants,\n HeroColorVariant,\n HeroSizeVariant,\n HeroGroupTypeVariant,\n HeroTypeVariant,\n HeroTextColor,\n} from \"../../utils/utils\";\n\n@Component({\n tag: \"hy-hero\",\n styleUrl: \"hy-hero.scss\",\n shadow: false,\n})\nexport class HyHero {\n @Element() el: HTMLElement;\n @Prop() heroType: HeroTypeVariant = HeroTypeVariant.landing;\n @Prop() heroGroupType: HeroGroupTypeVariant = HeroGroupTypeVariant.default;\n @Prop() colorVariant: HeroColorVariant = HeroColorVariant.blue;\n @Prop() sizeVariant: HeroSizeVariant = HeroSizeVariant.large;\n @Prop() heroTextColor: HeroTextColor = null;\n @Prop() image: string;\n @Prop() imageHeight: number = null;\n @Prop() imageWidth: number = null;\n @Prop() imageAltText: string = \"\";\n @Prop() disableLazy: boolean = false;\n @Prop() hasShortcuts: boolean = false;\n @Prop() heading: string;\n @Prop() description: string;\n @Prop() subtitle: string;\n @Prop() url: string;\n @Prop() urlTitle: string;\n @Prop() scLabel?: string;\n @Prop() isExternal: boolean = false;\n private _sourceSet: ImageSrcSet[];\n @Prop() sourceSet: ImageSrcSet[] | string;\n\n async componentWillLoad() {\n this._sourceSet = await jsonParserWorker(this.sourceSet);\n }\n\n // TODO: Refactor, find way to get rid of this.\n handleHeroImageObjectFitValue(heroSizeVariant, heroElement) {\n const heroContentContainerElement = heroElement.getElementsByClassName(\n \"hy-hero__content-container\"\n )[0] as HTMLElement;\n\n if (heroSizeVariant === \"small\") {\n if (heroContentContainerElement.offsetHeight >= 300) {\n heroElement.classList.add(\"has-cover\");\n } else {\n heroElement.classList.remove(\"has-cover\");\n }\n }\n\n if (heroSizeVariant === \"large\") {\n if (heroContentContainerElement.offsetHeight >= 344) {\n heroElement.classList.add(\"has-cover\");\n } else {\n heroElement.classList.remove(\"has-cover\");\n }\n }\n }\n\n createImageElement(props, srcSet, aspectRatio) {\n return (\n <div class={`hy-hero__image-container`} style={aspectRatio}>\n {props.image &&\n (srcSet ? (\n <picture>\n {srcSet.map((item) => (\n <source\n srcSet={item.src}\n media={item.media}\n type={item.type}\n sizes={item.sizes ? item.sizes : \"\"}\n />\n ))}\n <img\n loading={props.disableLazy ? \"eager\" : \"lazy\"}\n alt={props.imageAltText}\n class={`hy-image__image`}\n src={props.image}\n height={props.imageHeight}\n width={props.imageWidth}\n />\n </picture>\n ) : (\n <img\n loading={props.disableLazy ? \"eager\" : \"lazy\"}\n alt={props.imageAltText}\n class={`hy-image__image`}\n src={props.image}\n height={props.imageHeight}\n width={props.imageWidth}\n />\n ))}\n </div>\n );\n }\n\n // TODO: Refactor, is this still even used?\n setAspectRatio(aspectRatioWidth = 16, aspectRatioHeight = 10) {\n const aspect = (aspectRatioHeight / aspectRatioWidth) * 100;\n return {\n \"--aspectRatio\": `${aspect}%` as \"aspectRatio\",\n //\"aspect-ratio\": `${aspectRatioWidth} / ${aspectRatioHeight}` as \"aspectRatio\",\n };\n }\n\n render() {\n let variant = CtaLinkButtonVariants.heroWhite;\n let colorVariantValue = this.colorVariant;\n let heroTypeValue = this.heroType;\n\n //TODO: Refactor\n if (this.heroType === \"minor_landing\") {\n colorVariantValue = HeroColorVariant.white;\n heroTypeValue = HeroTypeVariant.landing;\n }\n\n if (colorVariantValue === HeroColorVariant.blue) {\n variant = CtaLinkButtonVariants.heroBlue;\n }\n\n if (colorVariantValue === HeroColorVariant.black) {\n variant = CtaLinkButtonVariants.heroBlack;\n }\n\n if (!colorVariantValue || colorVariantValue === \"fp_white\") {\n colorVariantValue = HeroColorVariant.white;\n }\n\n const hyHeroClasses = [\n \"hy-hero\",\n `hy-hero--${heroTypeValue}`,\n `hy-hero--${this.heroGroupType}`,\n `hy-hero--${colorVariantValue}`,\n `hy-hero--${this.sizeVariant}`,\n this.hasShortcuts ? 'has-shortcuts' : '',\n ];\n\n const heroTitleClasses = [\"hy-hero__title\", \"hy-heading__hero\"].join(\" \");\n\n // TODO: Refactor, find way to get rid of this.\n window.onload = () => {\n const heroElement = document.getElementsByClassName(\"hy-hero\")[0] as HTMLElement;\n this.handleHeroImageObjectFitValue(this.sizeVariant, heroElement);\n window.addEventListener(\"resize\", () => {\n clearTimeout(timeout);\n timeout = setTimeout(() => this.handleHeroImageObjectFitValue(this.sizeVariant, heroElement), delay);\n });\n };\n\n if (heroTypeValue === \"front_page\" && this.sizeVariant !== 'full-image') {\n return (\n <Host>\n <div class={hyHeroClasses.join(\" \")}>\n <div class={`hy-hero__container`}>\n {this.createImageElement(this, this._sourceSet, this.setAspectRatio())}\n <div class={`hy-hero__spacer-box`}></div>\n <div class={`hy-hero__content-container`}>\n <div class={`hy-hero__content`}>\n <div class={`hy-hero__title-container`}>\n <h2 innerHTML={this.heading} class={heroTitleClasses}></h2>\n </div>\n {this.description && <p class={`hy-hero__description`}>{this.description}</p>}\n {this.url && (\n <div class={`hy-hero__actions`}>\n <hy-cta-button\n link-content={this.urlTitle}\n sc-label={this.scLabel}\n url={this.url}\n is-external={this.isExternal}\n variant={variant}\n />\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n <hy-box mb=\"2, 2, 1, 1\" />\n </Host>\n );\n }\n\n if (this.sizeVariant === 'full-image') {\n const linkTarget = this.isExternal ? '_blank' : '_self';\n return (\n <div class={`hy-hero hy-hero--full-image`}>\n <div class={`hy-hero__container`}>\n {this.createImageElement(this, this._sourceSet, this.setAspectRatio(16, 8))}\n <div class={`hy-hero__content-container`}>\n <div class={`hy-hero__content`} data-text-color={this.heroTextColor}>\n {this.subtitle && <span class={`hy-hero__subtitle`}>{this.subtitle}</span>}\n <h2 innerHTML={this.heading} class={heroTitleClasses}></h2>\n {this.description && <p class={`hy-hero__description`}>{this.description}</p>}\n {this.url && (\n <div class={`hy-hero__actions`}>\n <a class=\"hy-hero__link\" href={this.url} aria-label={this.scLabel} target={linkTarget} data-text-color={this.heroTextColor}>\n {this.urlTitle}\n <hy-icon icon={\"hy-icon-arrow-right\"} size={16} />\n </a>\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <Host>\n <div class={hyHeroClasses.join(\" \")}>\n <div class={`hy-hero__container`}>\n {this.createImageElement(this, this._sourceSet, this.setAspectRatio())}\n <div class={`hy-hero__content-container`}>\n <div class={`hy-hero__content`}>\n <div class={`hy-hero__title-container`}>\n <h2 innerHTML={this.heading} class={heroTitleClasses}></h2>\n </div>\n {this.description && <p class={`hy-hero__description`}>{this.description}</p>}\n {this.url && (\n <div class={`hy-hero__actions`}>\n <hy-cta-button\n link-content={this.urlTitle}\n sc-label={this.scLabel}\n url={this.url}\n is-external={this.isExternal}\n variant={variant}\n />\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n <hy-box mb=\"2, 2, 1, 1\" />\n </Host>\n );\n }\n}\n"]}
|
|
@@ -153,6 +153,7 @@ export var HeroSizeVariant;
|
|
|
153
153
|
(function (HeroSizeVariant) {
|
|
154
154
|
HeroSizeVariant["large"] = "large";
|
|
155
155
|
HeroSizeVariant["small"] = "small";
|
|
156
|
+
HeroSizeVariant["fullImage"] = "full-image";
|
|
156
157
|
})(HeroSizeVariant || (HeroSizeVariant = {}));
|
|
157
158
|
export var HeroTypeVariant;
|
|
158
159
|
(function (HeroTypeVariant) {
|
|
@@ -166,6 +167,13 @@ export var HeroGroupTypeVariant;
|
|
|
166
167
|
HeroGroupTypeVariant["default"] = "no_group";
|
|
167
168
|
HeroGroupTypeVariant["research"] = "research_group";
|
|
168
169
|
})(HeroGroupTypeVariant || (HeroGroupTypeVariant = {}));
|
|
170
|
+
export var HeroTextColor;
|
|
171
|
+
(function (HeroTextColor) {
|
|
172
|
+
HeroTextColor["dark_text_light_bg"] = "dark_text_light_bg";
|
|
173
|
+
HeroTextColor["light_text_dark_bg"] = "light_text_dark_bg";
|
|
174
|
+
HeroTextColor["dark_text_no_bg"] = "dark_text_no_bg";
|
|
175
|
+
HeroTextColor["light_text_no_bg"] = "light_text_no_bg";
|
|
176
|
+
})(HeroTextColor || (HeroTextColor = {}));
|
|
169
177
|
export var FooterLinkItemColor;
|
|
170
178
|
(function (FooterLinkItemColor) {
|
|
171
179
|
FooterLinkItemColor["black"] = "black";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;EACtB,mCAAmB,CAAA;EACnB,qCAAqB,CAAA;AACvB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB;AAUD,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;EAC5B,sCAAgB,CAAA;EAChB,mCAAa,CAAA;EACb,qCAAe,CAAA;EACf,qCAAe,CAAA;AACjB,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B;AAED,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;EAC3B,wCAAmB,CAAA;EACnB,kCAAa,CAAA;AACf,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAED,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;EAC5B,yCAAmB,CAAA;EACnB,4CAAsB,CAAA;AACxB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAED,MAAM,CAAN,IAAY,cAOX;AAPD,WAAY,cAAc;EACxB,gCAAc,CAAA;EACd,2BAAS,CAAA;EACT,2BAAS,CAAA;EACT,2BAAS,CAAA;EACT,2BAAS,CAAA;EACT,2BAAS,CAAA;AACX,CAAC,EAPW,cAAc,KAAd,cAAc,QAOzB;AAED,MAAM,CAAN,IAAY,sBAaX;AAbD,WAAY,sBAAsB;EAChC,6CAAmB,CAAA;EACnB,uCAAa,CAAA;EACb,mDAAyB,CAAA;EACzB,uDAA6B,CAAA;EAC7B,8DAAoC,CAAA;EACpC,8DAAoC,CAAA;EACpC,iDAAuB,CAAA;EACvB,wDAA8B,CAAA;EAC9B,wDAA8B,CAAA;EAC9B,4CAAkB,CAAA;EAClB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D,WAAY,mBAAmB;EAC7B,sCAAe,CAAA;EACf,sCAAe,CAAA;AACjB,CAAC,EAHW,mBAAmB,KAAnB,mBAAmB,QAG9B;AAED,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;EAC1B,uCAAmB,CAAA;EACnB,qCAAiB,CAAA;AACnB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAED,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;EAC1B,iCAAa,CAAA;EACb,iCAAa,CAAA;AACf,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B","sourcesContent":["import {FunctionalComponent} from \"@stencil/core\";\n\nexport type ButtonVariants = \"primary\" | \"secondary\";\nexport enum ButtonStates {\n enabled = \"enabled\",\n disabled = \"disabled\",\n}\n\nexport type FetchPriorityRange = \"low\" | \"high\" | \"auto\";\n\nexport type ProcessFlowBoxStepStates = \"first\" | \"default\";\n\nexport type IconName = {\n [key: string]: (props: any) => FunctionalComponent;\n};\n\nexport enum FooterLinkVariants {\n default = \"base\",\n base = \"base\",\n campus = \"base\",\n group = \"group\",\n}\n\nexport enum AccordionVariants {\n default = \"default\",\n mini = \"mini\",\n}\n\nexport enum BreadcrumbVariants {\n default = \"default\",\n landingLarge = \"large\",\n}\n\nexport enum HeadingVarians {\n default = \"h1\",\n h2 = \"h2\",\n h3 = \"h3\",\n h4 = \"h4\",\n h5 = \"h5\",\n h6 = \"h6\",\n}\n\nexport enum HeadingSectionVariants {\n default = \"default\",\n hero = \"hero\",\n subSection = \"subsection\",\n introduction = \"introduction\",\n landingPageHeader = \"landingsection\",\n contentPageHeader = \"contentsection\",\n frontPage = \"frontpage\",\n landingMajor = \"landing_major\",\n landingMinor = \"landing_minor\",\n course = \"courses\",\n groupFooterInfo = \"group_footer_info\",\n defaultFooterInfo = \"footer_info\",\n}\n\nexport enum LinkVariants {\n default = \"default\",\n paragraph = \"within-paragraph\",\n}\n\nexport enum CtaLinkVariants {\n default = \"default\",\n linkList = \"link-list\",\n}\n\nexport enum CtaLinkButtonVariants {\n default = \"default\",\n onBlueBkgd = \"blue-background\",\n onWhiteBkgd = \"white-background\",\n onBlackBkgd = \"black-background\",\n onTransparentBkgd = \"transparent-background\",\n heroWhite = \"hero-white\",\n heroBlue = \"hero-blue\",\n heroBlack = \"hero-black\",\n darkBlue = \"dark-blue-background\",\n}\n\nexport enum ProcessFlowBoxVariants {\n default = \"big\",\n small = \"small\",\n}\n\nexport enum KeyHighlightVariants {\n default = \"big\",\n small = \"small\",\n}\n\nexport enum LinkBoxVariants {\n default = \"content\",\n landingPage = \"landing\",\n}\n\nexport enum CourseVariants {\n default = \"row\",\n row = \"row\",\n grid = \"grid\",\n}\n\nexport enum CourseStateVariants {\n default = \"current\",\n pastCourses = \"past-courses\",\n}\n\nexport enum PersonCardVariants {\n default = \"results\",\n searchPanel = \"search-panel\",\n extended = \"extended\",\n}\n\nexport enum ListStyleVariants {\n default = \"grid\",\n grid = \"grid\",\n list = \"list\",\n}\n\nexport enum ListItemVariants {\n default = \"default\",\n degreeProgramme = \"degree\",\n position = \"position\",\n}\n\nexport enum PaginationItemVariants {\n default = \"default\",\n current = \"current\",\n previous = \"previous\",\n next = \"next\",\n ellipsis = \"ellipsis\",\n}\n\nexport enum MenuType {\n desktop = \"desktop\",\n mobile = \"mobile\",\n tablet = \"tablet\",\n default = \"desktop\",\n}\n\nexport enum SiteLogoSize {\n small = 32,\n big = 64,\n large = 80,\n}\n\nexport enum FooterVariant {\n header = \"header\",\n footer = \"footer\",\n}\n\nexport enum ColorVariant {\n black = \"var(--brand-main-nearly-black)\",\n white = \"var(--grayscale-white)\",\n grey_dark = \"var(--grayscale-dark)\",\n}\n\nexport type IntroductionBgColors = \"white\";\n\nexport enum HeroColorVariant {\n blue = \"blue\",\n black = \"black\",\n white = \"white\",\n fp_white = \"fp_white\",\n}\n\nexport enum HeroSizeVariant {\n large = \"large\",\n small = \"small\",\n fullImage = 'full-image',\n}\n\nexport enum HeroTypeVariant {\n landing = \"landing\",\n group_landing = \"group_landing\",\n minor_landing = \"minor_landing\",\n front_page = \"front_page\",\n}\n\nexport enum HeroGroupTypeVariant {\n default = \"no_group\",\n research = \"research_group\",\n}\n\nexport enum HeroTextColor {\n dark_text_light_bg = 'dark_text_light_bg',\n light_text_dark_bg = 'light_text_dark_bg',\n dark_text_no_bg = 'dark_text_no_bg',\n light_text_no_bg = 'light_text_no_bg',\n}\n\nexport enum FooterLinkItemColor {\n black = \"black\",\n white = \"white\",\n}\n\nexport enum CheckboxVariants {\n default = \"default\",\n button = \"button\",\n}\n\nexport enum GeneralListTypes {\n list = \"list\",\n grid = \"grid\",\n}\n"]}
|