@itcenteratunihelsinki/huds-lib 0.5.44 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/color-box_8.cjs.entry.js +210 -0
- package/dist/cjs/{globalScript-0c66cb96.js → globalScript-6b592153.js} +1 -1
- package/dist/cjs/huds-lib.cjs.js +4 -4
- package/dist/cjs/hy-accordion-container_89.cjs.entry.js +7658 -0
- package/dist/cjs/{index-dd5e5023.js → index-dfc917d9.js} +80 -64
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{utils-eeb7b089.js → utils-00f72b1e.js} +0 -2
- package/dist/collection/collection-manifest.json +95 -14
- package/dist/collection/components/button/button.js +7 -2
- package/dist/collection/components/heading/heading.js +4 -4
- package/dist/collection/components/hy-main/hy-main.css +3 -2
- package/dist/collection/components/hy-search-field/hy-search-field.js +28 -0
- package/dist/collection/components/navigation/menu/menu.js +47 -35
- package/dist/collection/components/navigation/menu-item/menu-item.js +1 -17
- package/dist/collection/components/navigation/menu-level-container/menu-level-container.css +0 -236
- package/dist/collection/components/navigation/menu-level-container/menu-level-container.js +1 -48
- package/dist/collection/components/person-profile/person-profile.js +8 -1
- package/dist/collection/components/site-header/hy-desktop-menu-links/hy-desktop-menu-links.js +27 -19
- package/dist/collection/components/site-header/site-header.js +15 -3
- package/dist/collection/utils/utils.js +0 -2
- package/dist/esm/color-box_8.entry.js +199 -0
- package/dist/esm/{globalScript-92c6b812.js → globalScript-9d045b36.js} +1 -1
- package/dist/esm/huds-lib.js +4 -4
- package/dist/esm/hy-accordion-container_89.entry.js +7566 -0
- package/dist/esm/{index-083c8c8a.js → index-daaf0985.js} +80 -64
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{utils-708bbefe.js → utils-159098a4.js} +1 -3
- package/dist/huds-lib/huds-lib.esm.js +1 -1
- package/dist/huds-lib/{p-fd1edbd5.js → p-04dcccdc.js} +1 -1
- package/dist/huds-lib/p-152d3e8d.entry.js +86 -0
- package/dist/huds-lib/p-2efc8ca0.entry.js +1 -0
- package/dist/huds-lib/{p-8ab550d6.js → p-d9dc337b.js} +1 -1
- package/dist/huds-lib/{p-bb24c6b5.js → p-f8697bf9.js} +1 -1
- package/dist/types/components/button/button.d.ts +1 -1
- package/dist/types/components/hy-search-field/hy-search-field.d.ts +1 -0
- package/dist/types/components/navigation/menu/menu.d.ts +1 -0
- package/dist/types/components/person-profile/person-profile.d.ts +1 -0
- package/dist/types/components.d.ts +3 -201
- package/dist/types/stencil-public-runtime.d.ts +7 -4
- package/dist/types/utils/utils.d.ts +0 -2
- package/loader/index.d.ts +13 -4
- package/loader/{index.es2017.mjs → index.es2017.js} +1 -2
- package/loader/index.js +13 -0
- package/loader/package.json +5 -7
- package/package.json +2 -2
- package/dist/cjs/color-box.cjs.entry.js +0 -19
- package/dist/cjs/emotion.esm-563b6504.js +0 -1397
- package/dist/cjs/hy-accordion-container_5.cjs.entry.js +0 -578
- package/dist/cjs/hy-adjacent-image-text.cjs.entry.js +0 -51
- package/dist/cjs/hy-anchor-link-list.cjs.entry.js +0 -45
- package/dist/cjs/hy-badge.cjs.entry.js +0 -21
- package/dist/cjs/hy-banner.cjs.entry.js +0 -45
- package/dist/cjs/hy-baseline.cjs.entry.js +0 -32
- package/dist/cjs/hy-box-container.cjs.entry.js +0 -33
- package/dist/cjs/hy-box.cjs.entry.js +0 -165
- package/dist/cjs/hy-breadcrumbs.cjs.entry.js +0 -231
- package/dist/cjs/hy-button.cjs.entry.js +0 -100
- package/dist/cjs/hy-checkbox.cjs.entry.js +0 -33
- package/dist/cjs/hy-collaboration.cjs.entry.js +0 -19
- package/dist/cjs/hy-content-list-item.cjs.entry.js +0 -70
- package/dist/cjs/hy-content-list.cjs.entry.js +0 -112
- package/dist/cjs/hy-crisis-banner.cjs.entry.js +0 -19
- package/dist/cjs/hy-cta-button.cjs.entry.js +0 -30
- package/dist/cjs/hy-cta-link.cjs.entry.js +0 -26
- package/dist/cjs/hy-desktop-menu-links.cjs.entry.js +0 -328
- package/dist/cjs/hy-docs-container.cjs.entry.js +0 -19
- package/dist/cjs/hy-dropdown-panel_2.cjs.entry.js +0 -27
- package/dist/cjs/hy-dropdown.cjs.entry.js +0 -113
- package/dist/cjs/hy-filter-group-item.cjs.entry.js +0 -17
- package/dist/cjs/hy-filter-group.cjs.entry.js +0 -37
- package/dist/cjs/hy-filter-list-type.cjs.entry.js +0 -28
- package/dist/cjs/hy-filter-visibility-tool-reset_2.cjs.entry.js +0 -26
- package/dist/cjs/hy-filter-visibility-tool.cjs.entry.js +0 -24
- package/dist/cjs/hy-footer_5.cjs.entry.js +0 -201
- package/dist/cjs/hy-general-list_2.cjs.entry.js +0 -94
- package/dist/cjs/hy-grid-container.cjs.entry.js +0 -20
- package/dist/cjs/hy-grid-item.cjs.entry.js +0 -31
- package/dist/cjs/hy-grid-row.cjs.entry.js +0 -20
- package/dist/cjs/hy-heading.cjs.entry.js +0 -67
- package/dist/cjs/hy-hero.cjs.entry.js +0 -101
- package/dist/cjs/hy-icon.cjs.entry.js +0 -364
- package/dist/cjs/hy-image.cjs.entry.js +0 -50
- package/dist/cjs/hy-ingress.cjs.entry.js +0 -30
- package/dist/cjs/hy-introduction.cjs.entry.js +0 -55
- package/dist/cjs/hy-key-figure-group.cjs.entry.js +0 -77
- package/dist/cjs/hy-key-figure.cjs.entry.js +0 -22
- package/dist/cjs/hy-key-highlight-group.cjs.entry.js +0 -44
- package/dist/cjs/hy-key-highlight.cjs.entry.js +0 -22
- package/dist/cjs/hy-large-process-flow-phase.cjs.entry.js +0 -37
- package/dist/cjs/hy-large-process-flow.cjs.entry.js +0 -44
- package/dist/cjs/hy-link-box-list.cjs.entry.js +0 -54
- package/dist/cjs/hy-link-box.cjs.entry.js +0 -79
- package/dist/cjs/hy-link-list.cjs.entry.js +0 -44
- package/dist/cjs/hy-link.cjs.entry.js +0 -25
- package/dist/cjs/hy-list-item.cjs.entry.js +0 -239
- package/dist/cjs/hy-logo-grid-item.cjs.entry.js +0 -30
- package/dist/cjs/hy-logo-grid.cjs.entry.js +0 -20
- package/dist/cjs/hy-main-content-wrapper.cjs.entry.js +0 -20
- package/dist/cjs/hy-main.cjs.entry.js +0 -25
- package/dist/cjs/hy-menu-item-sidebar.cjs.entry.js +0 -159
- package/dist/cjs/hy-menu-item.cjs.entry.js +0 -147
- package/dist/cjs/hy-menu-language-item.cjs.entry.js +0 -25
- package/dist/cjs/hy-menu-language.cjs.entry.js +0 -91
- package/dist/cjs/hy-menu-level-container.cjs.entry.js +0 -137
- package/dist/cjs/hy-menu-main-group.cjs.entry.js +0 -151
- package/dist/cjs/hy-menu-mobile-breadcrumb.cjs.entry.js +0 -25
- package/dist/cjs/hy-menu-sidebar.cjs.entry.js +0 -290
- package/dist/cjs/hy-menu.cjs.entry.js +0 -111
- package/dist/cjs/hy-mobile-menu-shortcuts.cjs.entry.js +0 -26
- package/dist/cjs/hy-opening-hours-content.cjs.entry.js +0 -43
- package/dist/cjs/hy-opening-hours.cjs.entry.js +0 -35
- package/dist/cjs/hy-pager-item.cjs.entry.js +0 -45
- package/dist/cjs/hy-pager.cjs.entry.js +0 -20
- package/dist/cjs/hy-paragraph-text.cjs.entry.js +0 -45
- package/dist/cjs/hy-person-card.cjs.entry.js +0 -84
- package/dist/cjs/hy-person-profile.cjs.entry.js +0 -61
- package/dist/cjs/hy-process-flow-box.cjs.entry.js +0 -28
- package/dist/cjs/hy-process.cjs.entry.js +0 -57
- package/dist/cjs/hy-prominent-image.cjs.entry.js +0 -36
- package/dist/cjs/hy-quote.cjs.entry.js +0 -30
- package/dist/cjs/hy-row.cjs.entry.js +0 -42
- package/dist/cjs/hy-search-field.cjs.entry.js +0 -41
- package/dist/cjs/hy-section-container.cjs.entry.js +0 -19
- package/dist/cjs/hy-shortcuts.cjs.entry.js +0 -60
- package/dist/cjs/hy-site-header_3.cjs.entry.js +0 -444
- package/dist/cjs/hy-table-container.cjs.entry.js +0 -20
- package/dist/cjs/hy-tag.cjs.entry.js +0 -20
- package/dist/cjs/hy-tiny-text.cjs.entry.js +0 -20
- package/dist/cjs/hy-twitter-feed.cjs.entry.js +0 -27
- package/dist/cjs/hy-two-columns.cjs.entry.js +0 -21
- package/dist/cjs/hy-user-login-form.cjs.entry.js +0 -23
- package/dist/cjs/hy-video.cjs.entry.js +0 -67
- package/dist/cjs/index-314ad166.js +0 -967
- package/dist/collection/components/navigation/menu-item-sidebar/menu-item-sidebar.css +0 -399
- package/dist/collection/components/navigation/menu-item-sidebar/menu-item-sidebar.js +0 -580
- package/dist/collection/components/navigation/menu-sidebar/menu-sidebar.css +0 -337
- package/dist/collection/components/navigation/menu-sidebar/menu-sidebar.js +0 -669
- package/dist/esm/color-box.entry.js +0 -15
- package/dist/esm/emotion.esm-87895ee1.js +0 -1395
- package/dist/esm/hy-accordion-container_5.entry.js +0 -570
- package/dist/esm/hy-adjacent-image-text.entry.js +0 -47
- package/dist/esm/hy-anchor-link-list.entry.js +0 -41
- package/dist/esm/hy-badge.entry.js +0 -17
- package/dist/esm/hy-banner.entry.js +0 -41
- package/dist/esm/hy-baseline.entry.js +0 -28
- package/dist/esm/hy-box-container.entry.js +0 -29
- package/dist/esm/hy-box.entry.js +0 -161
- package/dist/esm/hy-breadcrumbs.entry.js +0 -227
- package/dist/esm/hy-button.entry.js +0 -96
- package/dist/esm/hy-checkbox.entry.js +0 -29
- package/dist/esm/hy-collaboration.entry.js +0 -15
- package/dist/esm/hy-content-list-item.entry.js +0 -66
- package/dist/esm/hy-content-list.entry.js +0 -108
- package/dist/esm/hy-crisis-banner.entry.js +0 -15
- package/dist/esm/hy-cta-button.entry.js +0 -26
- package/dist/esm/hy-cta-link.entry.js +0 -22
- package/dist/esm/hy-desktop-menu-links.entry.js +0 -324
- package/dist/esm/hy-docs-container.entry.js +0 -15
- package/dist/esm/hy-dropdown-panel_2.entry.js +0 -22
- package/dist/esm/hy-dropdown.entry.js +0 -109
- package/dist/esm/hy-filter-group-item.entry.js +0 -13
- package/dist/esm/hy-filter-group.entry.js +0 -33
- package/dist/esm/hy-filter-list-type.entry.js +0 -24
- package/dist/esm/hy-filter-visibility-tool-reset_2.entry.js +0 -21
- package/dist/esm/hy-filter-visibility-tool.entry.js +0 -20
- package/dist/esm/hy-footer_5.entry.js +0 -193
- package/dist/esm/hy-general-list_2.entry.js +0 -89
- package/dist/esm/hy-grid-container.entry.js +0 -16
- package/dist/esm/hy-grid-item.entry.js +0 -27
- package/dist/esm/hy-grid-row.entry.js +0 -16
- package/dist/esm/hy-heading.entry.js +0 -63
- package/dist/esm/hy-hero.entry.js +0 -97
- package/dist/esm/hy-icon.entry.js +0 -360
- package/dist/esm/hy-image.entry.js +0 -46
- package/dist/esm/hy-ingress.entry.js +0 -26
- package/dist/esm/hy-introduction.entry.js +0 -51
- package/dist/esm/hy-key-figure-group.entry.js +0 -73
- package/dist/esm/hy-key-figure.entry.js +0 -18
- package/dist/esm/hy-key-highlight-group.entry.js +0 -40
- package/dist/esm/hy-key-highlight.entry.js +0 -18
- package/dist/esm/hy-large-process-flow-phase.entry.js +0 -33
- package/dist/esm/hy-large-process-flow.entry.js +0 -40
- package/dist/esm/hy-link-box-list.entry.js +0 -50
- package/dist/esm/hy-link-box.entry.js +0 -75
- package/dist/esm/hy-link-list.entry.js +0 -40
- package/dist/esm/hy-link.entry.js +0 -21
- package/dist/esm/hy-list-item.entry.js +0 -235
- package/dist/esm/hy-logo-grid-item.entry.js +0 -26
- package/dist/esm/hy-logo-grid.entry.js +0 -16
- package/dist/esm/hy-main-content-wrapper.entry.js +0 -16
- package/dist/esm/hy-main.entry.js +0 -21
- package/dist/esm/hy-menu-item-sidebar.entry.js +0 -155
- package/dist/esm/hy-menu-item.entry.js +0 -143
- package/dist/esm/hy-menu-language-item.entry.js +0 -21
- package/dist/esm/hy-menu-language.entry.js +0 -87
- package/dist/esm/hy-menu-level-container.entry.js +0 -133
- package/dist/esm/hy-menu-main-group.entry.js +0 -147
- package/dist/esm/hy-menu-mobile-breadcrumb.entry.js +0 -21
- package/dist/esm/hy-menu-sidebar.entry.js +0 -286
- package/dist/esm/hy-menu.entry.js +0 -107
- package/dist/esm/hy-mobile-menu-shortcuts.entry.js +0 -22
- package/dist/esm/hy-opening-hours-content.entry.js +0 -39
- package/dist/esm/hy-opening-hours.entry.js +0 -31
- package/dist/esm/hy-pager-item.entry.js +0 -41
- package/dist/esm/hy-pager.entry.js +0 -16
- package/dist/esm/hy-paragraph-text.entry.js +0 -41
- package/dist/esm/hy-person-card.entry.js +0 -80
- package/dist/esm/hy-person-profile.entry.js +0 -57
- package/dist/esm/hy-process-flow-box.entry.js +0 -24
- package/dist/esm/hy-process.entry.js +0 -53
- package/dist/esm/hy-prominent-image.entry.js +0 -32
- package/dist/esm/hy-quote.entry.js +0 -26
- package/dist/esm/hy-row.entry.js +0 -38
- package/dist/esm/hy-search-field.entry.js +0 -37
- package/dist/esm/hy-section-container.entry.js +0 -15
- package/dist/esm/hy-shortcuts.entry.js +0 -56
- package/dist/esm/hy-site-header_3.entry.js +0 -438
- package/dist/esm/hy-table-container.entry.js +0 -16
- package/dist/esm/hy-tag.entry.js +0 -16
- package/dist/esm/hy-tiny-text.entry.js +0 -16
- package/dist/esm/hy-twitter-feed.entry.js +0 -23
- package/dist/esm/hy-two-columns.entry.js +0 -17
- package/dist/esm/hy-user-login-form.entry.js +0 -19
- package/dist/esm/hy-video.entry.js +0 -63
- package/dist/esm/index-41a1e449.js +0 -965
- package/dist/huds-lib/p-003597de.entry.js +0 -1
- package/dist/huds-lib/p-00a1f0c4.entry.js +0 -1
- package/dist/huds-lib/p-045ec3b7.entry.js +0 -6
- package/dist/huds-lib/p-065ae4a9.entry.js +0 -1
- package/dist/huds-lib/p-095afc4e.entry.js +0 -1
- package/dist/huds-lib/p-0a37696c.entry.js +0 -1
- package/dist/huds-lib/p-0b2e3057.entry.js +0 -1
- package/dist/huds-lib/p-0ba24d1d.entry.js +0 -1
- package/dist/huds-lib/p-0d751fcd.entry.js +0 -1
- package/dist/huds-lib/p-0def2cda.entry.js +0 -1
- package/dist/huds-lib/p-0f9c4661.entry.js +0 -8
- package/dist/huds-lib/p-114f1281.entry.js +0 -1
- package/dist/huds-lib/p-14a7e308.entry.js +0 -1
- package/dist/huds-lib/p-179221b4.entry.js +0 -1
- package/dist/huds-lib/p-1ed13a8e.entry.js +0 -1
- package/dist/huds-lib/p-1f5cb6ed.entry.js +0 -1
- package/dist/huds-lib/p-24c25896.entry.js +0 -1
- package/dist/huds-lib/p-27a613af.entry.js +0 -1
- package/dist/huds-lib/p-29a5f847.entry.js +0 -1
- package/dist/huds-lib/p-2c83cfcf.entry.js +0 -1
- package/dist/huds-lib/p-309dde97.entry.js +0 -1
- package/dist/huds-lib/p-31d9c326.entry.js +0 -1
- package/dist/huds-lib/p-349817f6.entry.js +0 -1
- package/dist/huds-lib/p-3641da70.entry.js +0 -1
- package/dist/huds-lib/p-3bf480d9.entry.js +0 -1
- package/dist/huds-lib/p-3d35d226.entry.js +0 -1
- package/dist/huds-lib/p-3e4344d2.entry.js +0 -1
- package/dist/huds-lib/p-3f050660.entry.js +0 -1
- package/dist/huds-lib/p-40ab2704.entry.js +0 -6
- package/dist/huds-lib/p-4252e76e.entry.js +0 -1
- package/dist/huds-lib/p-47d919f5.entry.js +0 -1
- package/dist/huds-lib/p-488053bf.entry.js +0 -1
- package/dist/huds-lib/p-497703c3.entry.js +0 -1
- package/dist/huds-lib/p-4d4869f9.entry.js +0 -1
- package/dist/huds-lib/p-518b6042.entry.js +0 -1
- package/dist/huds-lib/p-51dd0bf2.entry.js +0 -1
- package/dist/huds-lib/p-521557a1.entry.js +0 -1
- package/dist/huds-lib/p-570b0c50.entry.js +0 -1
- package/dist/huds-lib/p-604e4a62.entry.js +0 -1
- package/dist/huds-lib/p-608090da.entry.js +0 -1
- package/dist/huds-lib/p-6089a8b3.entry.js +0 -1
- package/dist/huds-lib/p-67b6fddc.entry.js +0 -1
- package/dist/huds-lib/p-69559eff.entry.js +0 -1
- package/dist/huds-lib/p-69849560.entry.js +0 -1
- package/dist/huds-lib/p-6c54b7bc.entry.js +0 -1
- package/dist/huds-lib/p-6c56dcbb.entry.js +0 -1
- package/dist/huds-lib/p-7225fde6.entry.js +0 -1
- package/dist/huds-lib/p-734da8db.entry.js +0 -1
- package/dist/huds-lib/p-75f84185.entry.js +0 -1
- package/dist/huds-lib/p-795c4838.entry.js +0 -1
- package/dist/huds-lib/p-7ca87180.entry.js +0 -1
- package/dist/huds-lib/p-7dd26e2a.entry.js +0 -1
- package/dist/huds-lib/p-830cfabf.entry.js +0 -69
- package/dist/huds-lib/p-8a7b55ed.entry.js +0 -1
- package/dist/huds-lib/p-8f314f7f.entry.js +0 -1
- package/dist/huds-lib/p-90a2d5bd.entry.js +0 -1
- package/dist/huds-lib/p-98487b2c.entry.js +0 -1
- package/dist/huds-lib/p-9a45dd9a.entry.js +0 -1
- package/dist/huds-lib/p-9b5113e0.entry.js +0 -1
- package/dist/huds-lib/p-a0a1ead3.entry.js +0 -1
- package/dist/huds-lib/p-a4745be5.entry.js +0 -1
- package/dist/huds-lib/p-a54ddb3e.entry.js +0 -1
- package/dist/huds-lib/p-a7922d26.entry.js +0 -1
- package/dist/huds-lib/p-a82d4779.js +0 -1
- package/dist/huds-lib/p-aca0eb7d.entry.js +0 -1
- package/dist/huds-lib/p-afe191fd.entry.js +0 -1
- package/dist/huds-lib/p-b7268181.entry.js +0 -1
- package/dist/huds-lib/p-baada6d9.entry.js +0 -1
- package/dist/huds-lib/p-bd31e4b5.entry.js +0 -1
- package/dist/huds-lib/p-bd56a257.entry.js +0 -1
- package/dist/huds-lib/p-c2b771ef.entry.js +0 -1
- package/dist/huds-lib/p-c87b7917.entry.js +0 -1
- package/dist/huds-lib/p-ca66cf04.js +0 -1
- package/dist/huds-lib/p-d56f5a7a.entry.js +0 -1
- package/dist/huds-lib/p-d5a6bba6.entry.js +0 -1
- package/dist/huds-lib/p-db4dc333.entry.js +0 -1
- package/dist/huds-lib/p-dc6a653f.entry.js +0 -1
- package/dist/huds-lib/p-dd2d9165.entry.js +0 -1
- package/dist/huds-lib/p-e24fb999.entry.js +0 -1
- package/dist/huds-lib/p-e430c2a0.entry.js +0 -1
- package/dist/huds-lib/p-e7abd29a.entry.js +0 -1
- package/dist/huds-lib/p-e7c21f51.entry.js +0 -1
- package/dist/huds-lib/p-e834c239.entry.js +0 -1
- package/dist/huds-lib/p-efc359e3.entry.js +0 -1
- package/dist/huds-lib/p-f0d518a5.entry.js +0 -1
- package/dist/huds-lib/p-fbf11f85.entry.js +0 -1
- package/dist/huds-lib/p-fcf2d27d.entry.js +0 -1
- package/dist/huds-lib/p-ff62346a.entry.js +0 -1
- package/dist/loader/cdn.js +0 -3
- package/dist/loader/index.cjs.js +0 -3
- package/dist/loader/index.d.ts +0 -13
- package/dist/loader/index.es2017.js +0 -3
- package/dist/loader/index.js +0 -4
- package/dist/loader/package.json +0 -10
- package/dist/types/components/navigation/menu-item-sidebar/menu-item-sidebar.d.ts +0 -34
- package/dist/types/components/navigation/menu-sidebar/menu-sidebar.d.ts +0 -90
- package/loader/index.mjs +0 -22
- package/loader/node-main.js +0 -3
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-dd5e5023.js');
|
|
6
|
-
const utils = require('./utils-eeb7b089.js');
|
|
7
|
-
|
|
8
|
-
const hyListItemCss = ":root{--brand-main:#0e688b;--brand-main-soft:#b1e7ff;--brand-main-bright:#48c5f8;--brand-main-light:#107eab;--brand-main-active:#005379;--brand-main-dark:#003146;--brand-main-nearly-black:#000222;--link-blue:#0479a4;--link-disabled:#767676;--grayscale-white:#fff;--grayscale-slightly-gray:#fefefe;--grayscale-light:#f8f8f8;--grayscale-medium:#d2d2d2;--grayscale-background-box:#f5f5f5;--grayscale-tabs-border:#e6e6e6;--grayscale-background-arrow:#dfdfdf;--grayscale-medium-dark:#979797;--grayscale-dark:#555555;--grayscale-dark-text:#222222;--grayscale-black:#000000;--additional-red-light:#e5053a;--additional-red-dark:#a31621;--additional-purple-light:#420039;--additional-yellow:#f9a21a;--additional-skyblue:#48c5f8;--additional-orange:#d14600;--additional-green-light:#96ba3c;--additional-green-dark:#006400;--hover-gray:#eaeaea}*{-webkit-box-sizing:border-box;box-sizing:border-box}:root{--gutter-mobile:16px;--gutter-narrow:24px;--gutter-medium:24px;--gutter-wide:24px;--gutter-extrawide:32px}:root{--breakpoint-extrawide:75.0625rem;--breakpoint-max-width:75.0625rem;--breakpoint-medium:48rem;--breakpoint-narrow:30rem;--breakpoint-wide:60rem}:host{display:block}.hy-list-item{display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--main-font-family);text-decoration:none}.hy-list-item__default{margin-bottom:28px}@media (min-width: 60rem){.hy-list-item__default{margin-bottom:32px}}.hy-list-item__default__info-container__header{font-size:0.75rem;line-height:14px;color:var(--grayscale-dark);letter-spacing:0;margin-bottom:4px}@media (min-width: 30rem){.hy-list-item__default__info-container__header{font-size:0.875rem;line-height:18px;margin-bottom:2px}}.hy-list-item__default__info-container__title{font-size:1.125rem;line-height:22px;font-weight:700;color:var(--brand-main-light);letter-spacing:-0.56px;margin-bottom:6px}@media (min-width: 30rem){.hy-list-item__default__info-container__title{font-size:1.375rem;line-height:28px;letter-spacing:-0.69px;margin-bottom:10px}}@media (min-width: 1601px){.hy-list-item__default__info-container__title{font-size:1.625rem;line-height:32px;letter-spacing:-0.8px;margin-bottom:8px}}@media (min-width: 75.0625rem){.hy-list-item__default__info-container__title__large{font-size:1.625rem;line-height:32px;letter-spacing:-0.8px;margin-bottom:8px}}.hy-list-item__default__info-container__link-container{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:6px}@media (min-width: 30rem){.hy-list-item__default__info-container__link-container{margin-bottom:8px}}.hy-list-item__default__info-container__link{font-size:0.75rem;line-height:16px;color:var(--grayscale-dark);letter-spacing:-0.07px;margin-left:4px}@media (min-width: 30rem){.hy-list-item__default__info-container__link{margin-left:5px}}.hy-list-item__default__info-container__link__icon svg{fill:var(--grayscale-dark)}.hy-list-item__default__info-container__description{font-size:0.875rem;line-height:20px;color:var(--grayscale-black);letter-spacing:0}@media (min-width: 30rem){.hy-list-item__default__info-container__description{font-size:1rem;line-height:24px}}.hy-list-item__position{background:radial-gradient(circle, var(--grayscale-light) 0%, var(--grayscale-background-box) 100%);-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}@media (min-width: 30rem){.hy-list-item__position{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}}.hy-list-item__position__info-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;-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;margin:0;padding:12px;position:relative}@media (min-width: 60rem){.hy-list-item__position__info-container{padding:12px 16px}}@media (min-width: 1601px){.hy-list-item__position__info-container{padding:20px 24px}}.hy-list-item__position__info-container__header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;color:var(--brand-main);font-family:var(--main-font-family);font-size:14px;font-weight:600;letter-spacing:-0.2px;line-height:14px;margin-bottom:14px}.hy-list-item__position__info-container__header .icon{margin-right:0.75rem}.hy-list-item__position__info-container__header .icon svg{fill:var(--brand-main)}@media (min-width: 75.0625rem){.hy-list-item__position__info-container__large{padding:20px 24px}}.hy-list-item__position__info-container__data{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.hy-list-item__position__info-container__title{font-size:1.125rem;line-height:20px;font-weight:700;font-family:var(--main-font-family);color:var(--grayscale-black);margin-bottom:12px;letter-spacing:-0.45px;line-height:22px}@media (min-width: 30rem){.hy-list-item__position__info-container__title{letter-spacing:-0.5px}}.hy-list-item__position__info-container__description{font-size:0.875rem;color:var(--grayscale-dark-text);display:none;font-family:var(--main-font-family);letter-spacing:0.8px;margin-bottom:14px;line-height:20px}@media (min-width: 30rem){.hy-list-item__position__info-container__description{display:block}}.hy-list-item__position__info-container__outgoing-link{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;position:relative;padding:0 24px 24px 12px}@media (min-width: 30rem){.hy-list-item__position__info-container__outgoing-link{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:0 24px 24px 0}}.hy-list-item__position__info-container__outgoing-link .label{color:var(--link-blue);font-family:var(--main-font-family);font-size:16px;font-weight:600;letter-spacing:-0.3px;line-height:20px}.hy-list-item__position__info-container__outgoing-link .icon{margin-right:4px;margin-bottom:2px}.hy-list-item__position__info-container__outgoing-link .icon svg{fill:var(--link-blue)}.hy-list-item__degree{background:radial-gradient(circle, var(--grayscale-light) 0%, var(--grayscale-background-box) 100%);-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}@media (min-width: 30rem){.hy-list-item__degree{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}}.hy-list-item__degree__image-container{display:block;position:relative;-webkit-box-flex:1;-ms-flex:1;flex:1}@media (min-width: 30rem){.hy-list-item__degree__image-container{-webkit-box-flex:0;-ms-flex:0 0 24%;flex:0 0 24%}}.hy-list-item__degree__image-container__image{vertical-align:bottom;max-width:100%;height:100%}.hy-list-item__degree__image-container__image img{-o-object-fit:cover;object-fit:cover;width:100%;height:100%}.hy-list-item__degree__image-container span{font-weight:600;font-size:0.75rem;line-height:14px;background-color:var(--additional-yellow);-webkit-box-shadow:0 2px 8px 0 rgba(0, 0, 0, 0.05);box-shadow:0 2px 8px 0 rgba(0, 0, 0, 0.05);color:var(--grayscale-black);left:-4px;letter-spacing:-0.07px;padding:5px 8px;position:absolute;top:16px;text-transform:uppercase}@media (min-width: 30rem){.hy-list-item__degree__image-container span{left:-8px}}@media (min-width: 60rem){.hy-list-item__degree__image-container span{top:22px}}.hy-list-item__degree__info-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;-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;margin:0;padding:12px;position:relative}@media (min-width: 60rem){.hy-list-item__degree__info-container{padding:12px 16px}}@media (min-width: 1601px){.hy-list-item__degree__info-container{padding:20px 24px}}@media (min-width: 75.0625rem){.hy-list-item__degree__info-container__large{padding:20px 24px}}.hy-list-item__degree__info-container__data{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.hy-list-item__degree__info-container__title{font-size:1.125rem;line-height:22px;font-weight:700;color:var(--link-blue);letter-spacing:-0.54px;margin-bottom:8px}@media (min-width: 60rem){.hy-list-item__degree__info-container__title{font-size:1.125rem;line-height:24px;letter-spacing:-0.5px}}@media (min-width: 1601px){.hy-list-item__degree__info-container__title{font-size:1.25rem;line-height:26px;letter-spacing:-0.6px}}@media (min-width: 75.0625rem){.hy-list-item__degree__info-container__title__large{font-size:1.25rem;line-height:26px;letter-spacing:-0.6px}}.hy-list-item__degree__info-container__description{font-size:0.875rem;line-height:18px;color:var(--grayscale-dark);letter-spacing:0;margin-bottom:16px}@media (min-width: 60rem){.hy-list-item__degree__info-container__description{letter-spacing:-0.2}}@media (min-width: 1601px){.hy-list-item__degree__info-container__description{font-size:1rem;line-height:20px;letter-spacing:-0.25px}}@media (min-width: 75.0625rem){.hy-list-item__degree__info-container__description__large{font-size:1rem;line-height:20px;letter-spacing:-0.25px}}.hy-list-item__degree__info-container__metadata-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-top:16px;width:100%}@media (min-width: 30rem){.hy-list-item__degree__info-container__metadata-wrapper{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}}.hy-list-item__degree__info-container__metadata-wrapper.link-only{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.hy-list-item__degree__info-container__additional-info{width:100%}.hy-list-item__degree__info-container__additional-info__item{font-size:0.75rem;line-height:16px;font-weight:300;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--grayscale-black);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;letter-spacing:-0.2px}@media (min-width: 1601px){.hy-list-item__degree__info-container__additional-info__item{font-size:0.875rem;line-height:16px}}@media (min-width: 75.0625rem){.hy-list-item__degree__info-container__additional-info__item__large{font-size:0.875rem;line-height:16px}}.hy-list-item__degree__info-container__additional-info__item.active::before{content:\" \";-webkit-box-sizing:border-box;box-sizing:border-box;height:14px;width:14px;border:3px solid #ffffff;border-radius:50%;background-color:#f9a21a;left:-7px;position:absolute}@media (min-width: 30rem){.hy-list-item__degree__info-container__additional-info__item.active::before{border:none;height:8px;margin-right:6px;width:8px;left:0;position:relative}}.hy-list-item__degree__info-container__outgoing-link{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;position:relative;width:100%}.hy-list-item__degree__info-container__outgoing-link a{-webkit-box-align:center;-ms-flex-align:center;align-items:center;bottom:0;top:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;position:relative;right:-18px;text-decoration:none}@media (min-width: 60rem){.hy-list-item__degree__info-container__outgoing-link a{right:-22px}}@media (min-width: 1601px){.hy-list-item__degree__info-container__outgoing-link a{right:-30px}}.hy-list-item__degree__info-container__outgoing-link a .label{font-size:0.875rem;line-height:16px;font-weight:700;color:var(--link-blue);letter-spacing:-0.5px;margin-right:8px;text-align:right}.hy-list-item__degree__info-container__outgoing-link a .icon-wrapper{background-color:var(--brand-main-light);z-index:10}.hy-list-item__degree__info-container__outgoing-link a .icon-wrapper .icon{position:relative;overflow:hidden}.hy-list-item__degree__info-container__outgoing-link a .icon-wrapper .icon svg{background-color:transparent;-webkit-box-shadow:0 2px 8px 0 rgba(0, 0, 0, 0.1);box-shadow:0 2px 8px 0 rgba(0, 0, 0, 0.1);fill:var(--grayscale-white);padding:6.4px}@media (min-width: 1601px){.hy-list-item__degree__info-container__outgoing-link a .icon-wrapper .icon svg{height:36px;width:36px;padding:7.2px}}@media (min-width: 75.0625rem){.hy-list-item__degree__info-container__outgoing-link__large svg{height:36px;width:36px;padding:7.2px}}.hy-list-item-wrapper{font-family:var(--main-font-family)}.hy-list-item-wrapper__degree{margin-bottom:16px}@media (min-width: 30rem){.hy-list-item-wrapper__degree{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;margin-bottom:24px}}@media (min-width: 60rem){.hy-list-item-wrapper__degree{margin-bottom:28px}}@media (min-width: 1601px){.hy-list-item-wrapper__degree{margin-bottom:32px}}@media (min-width: 75.0625rem){.hy-list-item-wrapper__degree__large{margin-bottom:32px}}.hy-list-item-wrapper__degree__related-info{background:radial-gradient(circle, #f8f8f8 0%, #f5f5f5 100%);margin-top:4px;padding:0 12px 0 16px}@media (min-width: 30rem){.hy-list-item-wrapper__degree__related-info{padding:0 24px 0 16px}}@media (min-width: 60rem){.hy-list-item-wrapper__degree__related-info{margin-top:6px;padding:0 24px 0 24px}}@media (min-width: 1601px){.hy-list-item-wrapper__degree__related-info{margin-top:8px}}@media (min-width: 75.0625rem){.hy-list-item-wrapper__degree__related-info__large{margin-top:8px}}.hy-list-item-wrapper__degree__related-info__heading__link{text-decoration:none}.hy-list-item-wrapper__degree__related-info__heading__button{font-size:0.75rem;line-height:16px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:radial-gradient(circle, #f8f8f8 0%, #f5f5f5 100%);border:none;color:var(--grayscale-black);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;font-family:var(--main-font-family);letter-spacing:-0.2px;height:100%;padding:8px 0;text-align:left;width:100%}@media (min-width: 30rem){.hy-list-item-wrapper__degree__related-info__heading__button{font-size:0.75rem;line-height:20px;padding:14px 0}}@media (min-width: 60rem){.hy-list-item-wrapper__degree__related-info__heading__button{font-size:0.875rem;line-height:20px;letter-spacing:-0.4px;padding:18px 0}}.hy-list-item-wrapper__degree__related-info__heading__button:hover{cursor:pointer}.hy-list-item-wrapper__degree__related-info__heading__button__is-open svg{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.hy-list-item-wrapper__degree__related-info__heading__icon{margin-right:0.5rem;z-index:0}@media (min-width: 60rem){.hy-list-item-wrapper__degree__related-info__heading__icon{margin-right:12px}}.hy-list-item-wrapper__degree__related-info__heading__icon svg{fill:var(--brand-main);height:14px;width:14px}@media (min-width: 60rem){.hy-list-item-wrapper__degree__related-info__heading__icon svg{height:18px;width:18px}}.hy-list-item-wrapper__degree__related-info__content{display:none}.hy-list-item-wrapper__degree__related-info__content__is-open{border-top:1px solid #d2d2d2;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding:20px 8px 5px 8px}@media (min-width: 60rem){.hy-list-item-wrapper__degree__related-info__content__is-open{padding:20px 0 14px 0}}.hy-list-item-wrapper__degree__related-info__link{font-size:0.875rem;line-height:16px;font-weight:700;color:var(--link-blue);letter-spacing:-0.4px;margin-bottom:16px;text-decoration:none}";
|
|
9
|
-
|
|
10
|
-
let keys = {
|
|
11
|
-
enter: 'Enter',
|
|
12
|
-
space: 'Space',
|
|
13
|
-
};
|
|
14
|
-
const HyListItem = class {
|
|
15
|
-
constructor(hostRef) {
|
|
16
|
-
index.registerInstance(this, hostRef);
|
|
17
|
-
this.isExpandedRelatedContent = false;
|
|
18
|
-
this.variant = utils.ListItemVariants.default;
|
|
19
|
-
this.isExternal = false;
|
|
20
|
-
this.disableLazy = false;
|
|
21
|
-
this.outGoingUrlLabel = 'Go to programme page';
|
|
22
|
-
this.headerstyle = 'common';
|
|
23
|
-
this.truncateDescription = false;
|
|
24
|
-
this.truncateLimit = 140;
|
|
25
|
-
this._imageMinHeight = 0;
|
|
26
|
-
this._imageMinWidth = 0;
|
|
27
|
-
}
|
|
28
|
-
relatedLinksWatcher(newValue) {
|
|
29
|
-
if (typeof newValue === 'string') {
|
|
30
|
-
this._relatedLinks = JSON.parse(newValue);
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
this._relatedLinks = newValue;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
additionalInfoWatcher(newValue) {
|
|
37
|
-
if (typeof newValue === 'string') {
|
|
38
|
-
this._additionalInfo = JSON.parse(newValue);
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
this._additionalInfo = newValue;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
srcSetWatcher(data) {
|
|
45
|
-
this._sourceSet = typeof data === 'string' ? JSON.parse(data) : data;
|
|
46
|
-
}
|
|
47
|
-
expandRelatedInfoPanel(target) {
|
|
48
|
-
let contentSelector = `hy-list-item-wrapper__${this.variant}__related-info__content`;
|
|
49
|
-
let targetButtonClass = 'hy-list-item-wrapper__degree__related-info__heading__button';
|
|
50
|
-
let contentSection = document.querySelectorAll(`[aria-labelledBy="${target.id}"]`)[0];
|
|
51
|
-
if (contentSection) {
|
|
52
|
-
if (!this.isExpandedRelatedContent) {
|
|
53
|
-
contentSection.classList.add(`${contentSelector}__is-open`);
|
|
54
|
-
target.classList.add(`${targetButtonClass}__is-open`);
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
contentSection.classList.remove(`${contentSelector}__is-open`);
|
|
58
|
-
target.classList.remove(`${targetButtonClass}__is-open`);
|
|
59
|
-
}
|
|
60
|
-
this.isExpandedRelatedContent = !this.isExpandedRelatedContent;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
handleKeyDown(event) {
|
|
64
|
-
const key = event.code;
|
|
65
|
-
let target = event.target;
|
|
66
|
-
const targetElement = target.tagName.toLowerCase();
|
|
67
|
-
const possibleTags = [targetElement].some((r) => ['svg', 'path', 'button', 'a'].indexOf(r) >= 0);
|
|
68
|
-
if (target &&
|
|
69
|
-
possibleTags &&
|
|
70
|
-
!target.classList.contains('hy-list-item-wrapper__degree__related-info__link') &&
|
|
71
|
-
[keys.enter, keys.space].includes(key)) {
|
|
72
|
-
if (targetElement !== 'button') {
|
|
73
|
-
target = target.closest(`.hy-list-item-wrapper__${this.variant}__related-info__heading__button`);
|
|
74
|
-
}
|
|
75
|
-
this.expandRelatedInfoPanel(target);
|
|
76
|
-
event.preventDefault();
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
handleClick(event) {
|
|
80
|
-
let target = event.target;
|
|
81
|
-
const targetElement = target.tagName.toLowerCase();
|
|
82
|
-
const possibleTags = [targetElement].some((r) => ['svg', 'path', 'button', 'a'].indexOf(r) >= 0);
|
|
83
|
-
if (target && possibleTags && !target.classList.contains('hy-list-item-wrapper__degree__related-info__link')) {
|
|
84
|
-
if (targetElement !== 'button') {
|
|
85
|
-
target = target.closest(`.hy-list-item-wrapper__${this.variant}__related-info__heading__button`);
|
|
86
|
-
}
|
|
87
|
-
this.expandRelatedInfoPanel(target);
|
|
88
|
-
event.preventDefault();
|
|
89
|
-
event.stopImmediatePropagation();
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
componentWillLoad() {
|
|
93
|
-
this.relatedLinksWatcher(this.relatedLinks);
|
|
94
|
-
this.additionalInfoWatcher(this.additionalInfo);
|
|
95
|
-
this.srcSetWatcher(this.sourceSet);
|
|
96
|
-
}
|
|
97
|
-
componentDidLoad() {
|
|
98
|
-
let hyMainDiv = this.el.closest('.hy-main');
|
|
99
|
-
if (hyMainDiv) {
|
|
100
|
-
if (!hyMainDiv.classList.contains('with-sidebar')) {
|
|
101
|
-
this.headerstyle = 'large';
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
if (this.variant == utils.ListItemVariants.degreeProgramme) {
|
|
105
|
-
const image = document.querySelector('.hy-list-item__degree__image-container__image img');
|
|
106
|
-
if (image) {
|
|
107
|
-
image.addEventListener('load', function () {
|
|
108
|
-
const outputImageAspectRatio = 1;
|
|
109
|
-
const imageHeight = image.naturalHeight;
|
|
110
|
-
const imageWidth = image.naturalWidth;
|
|
111
|
-
const inputImageAspectRatio = imageWidth / imageHeight;
|
|
112
|
-
this._imageMinWidth = imageWidth;
|
|
113
|
-
this._imageMinHeight = imageHeight;
|
|
114
|
-
if (inputImageAspectRatio > outputImageAspectRatio) {
|
|
115
|
-
this._imageMinWidth = imageHeight * outputImageAspectRatio;
|
|
116
|
-
}
|
|
117
|
-
else if (inputImageAspectRatio < outputImageAspectRatio) {
|
|
118
|
-
this._imageMinHeight = imageWidth / outputImageAspectRatio;
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
render() {
|
|
125
|
-
const classWrapperAttributes = [
|
|
126
|
-
'hy-list-item-wrapper',
|
|
127
|
-
`hy-list-item-wrapper__${this.variant}`,
|
|
128
|
-
`hy-list-item-wrapper__${this.variant}__${this.headerstyle}`,
|
|
129
|
-
].join(' ');
|
|
130
|
-
const classAttributes = ['hy-list-item', `hy-list-item__${this.variant}`].join(' ');
|
|
131
|
-
const classInfoContainerAttributes = [
|
|
132
|
-
`hy-list-item__${this.variant}__info-container`,
|
|
133
|
-
`hy-list-item__${this.variant}__info-container__${this.headerstyle}`,
|
|
134
|
-
].join(' ');
|
|
135
|
-
/*const classInfoContainerDataAttributes = [
|
|
136
|
-
`hy-list-item__${this.variant}__info-container__data`,
|
|
137
|
-
`hy-list-item__${this.variant}__info-container__data__${this.headerstyle}`,
|
|
138
|
-
].join(' ');*/
|
|
139
|
-
const classInfoContainerHeader = [
|
|
140
|
-
`hy-list-item__${this.variant}__info-container__header`,
|
|
141
|
-
`hy-list-item__${this.variant}__info-container__header__${this.headerstyle}`,
|
|
142
|
-
].join(' ');
|
|
143
|
-
const classInfoContainerTitle = [
|
|
144
|
-
`hy-list-item__${this.variant}__info-container__title`,
|
|
145
|
-
`hy-list-item__${this.variant}__info-container__title__${this.headerstyle}`,
|
|
146
|
-
].join(' ');
|
|
147
|
-
const classInfoContainerDescription = [
|
|
148
|
-
`hy-list-item__${this.variant}__info-container__description`,
|
|
149
|
-
`hy-list-item__${this.variant}__info-container__description__${this.headerstyle}`,
|
|
150
|
-
].join(' ');
|
|
151
|
-
const classInfoContainerLinkContainer = [`hy-list-item__${this.variant}__info-container__link-container`].join(' ');
|
|
152
|
-
const classInfoContainerLinkIcon = [`hy-list-item__${this.variant}__info-container__link__icon`].join(' ');
|
|
153
|
-
const classInfoContainerLink = [`hy-list-item__${this.variant}__info-container__link`].join(' ');
|
|
154
|
-
const target = this.isExternal ? '_blank' : '_self';
|
|
155
|
-
function truncate(str, n) {
|
|
156
|
-
return str.length > n ? str.substr(0, n - 1) + '...' : str;
|
|
157
|
-
}
|
|
158
|
-
switch (this.variant) {
|
|
159
|
-
case utils.ListItemVariants.position: {
|
|
160
|
-
const classInfoContainerOutgoingLink = [
|
|
161
|
-
`hy-list-item__${this.variant}__info-container__outgoing-link`,
|
|
162
|
-
`hy-list-item__${this.variant}__info-container__outgoing-link__${this.headerstyle}`,
|
|
163
|
-
].join(' ');
|
|
164
|
-
return (index.h("article", null, index.h("a", { class: classAttributes, href: this.url, target: target, "aria-label": this.scLabel }, index.h("div", { class: classInfoContainerAttributes }, index.h("div", { class: classInfoContainerHeader }, index.h("div", { class: "icon" }, index.h("hy-icon", { icon: 'hy-icon-units-and-faculties', size: 18 })), this.itemType), index.h("div", { class: classInfoContainerTitle }, this.itemTitle), this.itemDescription && (index.h("div", { class: classInfoContainerDescription, innerHTML: this.truncateDescription
|
|
165
|
-
? truncate(this.itemDescription, this.truncateLimit)
|
|
166
|
-
: this.itemDescription }))), index.h("div", { class: classInfoContainerOutgoingLink }, index.h("span", { class: "icon" }, index.h("hy-icon", { icon: 'hy-icon-done', size: 14 })), index.h("span", { class: "label" }, this.outGoingUrlLabel)))));
|
|
167
|
-
}
|
|
168
|
-
case utils.ListItemVariants.degreeProgramme: {
|
|
169
|
-
const classImageContainerAttributes = [`hy-list-item__${this.variant}__image-container`].join(' ');
|
|
170
|
-
const classImageContainerImage = [`hy-list-item__${this.variant}__image-container__image`].join(' ');
|
|
171
|
-
const classInfoContainerAdditionalInfoAttributes = [
|
|
172
|
-
`hy-list-item__${this.variant}__info-container__additional-info`,
|
|
173
|
-
`hy-list-item__${this.variant}__info-container__additional-info__${this.headerstyle}`,
|
|
174
|
-
].join(' ');
|
|
175
|
-
const withAdditionalInfo = this._additionalInfo && this._additionalInfo.length > 0 ? '' : 'link-only';
|
|
176
|
-
const classMetadataWrapper = [
|
|
177
|
-
`hy-list-item__${this.variant}__info-container__metadata-wrapper`,
|
|
178
|
-
withAdditionalInfo,
|
|
179
|
-
].join(' ');
|
|
180
|
-
const classContentWrapper = [`hy-list-item__${this.variant}__info-container__content-wrapper`].join(' ');
|
|
181
|
-
const classInfoContainerOutgoingLink = [
|
|
182
|
-
`hy-list-item__${this.variant}__info-container__outgoing-link`,
|
|
183
|
-
`hy-list-item__${this.variant}__info-container__outgoing-link__${this.headerstyle}`,
|
|
184
|
-
].join(' ');
|
|
185
|
-
const classInfoContainerOutgoingLinkUrl = [
|
|
186
|
-
`hy-list-item__${this.variant}__info-container__outgoing-link__link`,
|
|
187
|
-
].join(' ');
|
|
188
|
-
const classRelatedInfoContainer = [
|
|
189
|
-
`hy-list-item-wrapper__${this.variant}__related-info`,
|
|
190
|
-
`hy-list-item-wrapper__${this.variant}__related-info__${this.headerstyle}`,
|
|
191
|
-
].join(' ');
|
|
192
|
-
const classRelatedInfoHeading = [`hy-list-item-wrapper__${this.variant}__related-info__heading`].join(' ');
|
|
193
|
-
const classRelatedInfoHeadingLink = [`hy-list-item-wrapper__${this.variant}__related-info__heading__link`].join(' ');
|
|
194
|
-
const classRelatedInfoHeadingButton = [
|
|
195
|
-
`hy-list-item-wrapper__${this.variant}__related-info__heading__button`,
|
|
196
|
-
].join(' ');
|
|
197
|
-
const classRelatedInfoHeadingIcon = [`hy-list-item-wrapper__${this.variant}__related-info__heading__icon`].join(' ');
|
|
198
|
-
const classRelatedInfoContent = [`hy-list-item-wrapper__${this.variant}__related-info__content`].join(' ');
|
|
199
|
-
const classRelatedInfoLink = [`hy-list-item-wrapper__${this.variant}__related-info__link`].join(' ');
|
|
200
|
-
const titleAsId = this.relatedLinksBlockTitle && this.relatedLinksBlockTitle.length > 0
|
|
201
|
-
? `${this.itemTitle}-${this.relatedLinksBlockTitle}`.toLowerCase().replace(/\W/g, '-')
|
|
202
|
-
: '';
|
|
203
|
-
const accordionItemHref = '#' + titleAsId + '--title';
|
|
204
|
-
const relatedLinksCount = this.relatedLinksBlockTitle && this.relatedLinksBlockTitle.length > 0 ? this._relatedLinks.length : '';
|
|
205
|
-
return [
|
|
206
|
-
index.h("article", { class: classWrapperAttributes }, index.h("a", { class: classAttributes, href: this.url, target: target, "aria-label": this.scLabel }, index.h("div", { class: classImageContainerAttributes }, index.h("div", { class: classImageContainerImage }, this._sourceSet ? (index.h("picture", null, this._sourceSet.map((item) => (index.h("source", { srcSet: item.src, media: item.media, type: item.type, sizes: item.sizes ? item.sizes : '' }))), index.h("img", { loading: this.disableLazy ? 'eager' : 'lazy', "aria-hidden": "true", src: this.itemImageUrl, alt: this.itemImageAlt, style: {
|
|
207
|
-
'--minheight': `${this._imageMinHeight}px`,
|
|
208
|
-
'--minwidth': `${this._imageMinWidth}px`,
|
|
209
|
-
} }))) : (index.h("img", { loading: this.disableLazy ? 'eager' : 'lazy', "aria-hidden": "true", src: this.itemImageUrl, alt: this.itemImageAlt, style: {
|
|
210
|
-
'--minheight': `${this._imageMinHeight}px`,
|
|
211
|
-
'--minwidth': `${this._imageMinWidth}px`,
|
|
212
|
-
} }))), this.imageLabel && index.h("span", null, this.imageLabel)), index.h("div", { class: classInfoContainerAttributes }, index.h("div", { class: classContentWrapper }, index.h("div", { class: classInfoContainerTitle }, this.itemTitle), this.itemDescription && (index.h("div", { class: classInfoContainerDescription, innerHTML: this.itemDescription }))), index.h("div", { class: classMetadataWrapper }, this._additionalInfo && (index.h("div", { class: classInfoContainerAdditionalInfoAttributes }, this._additionalInfo.map((x) => {
|
|
213
|
-
let classInfoContainerAdditionalInfoItem = [
|
|
214
|
-
`hy-list-item__${this.variant}__info-container__additional-info__item`,
|
|
215
|
-
`hy-list-item__${this.variant}__info-container__additional-info__item__${this.headerstyle}`,
|
|
216
|
-
`${x.isActive.toString() == 'true' ? 'active' : ''}`,
|
|
217
|
-
].join(' ');
|
|
218
|
-
return index.h("div", { class: classInfoContainerAdditionalInfoItem }, x.text);
|
|
219
|
-
}))), index.h("div", { class: classInfoContainerOutgoingLink }, index.h("a", { href: this.url, target: target, "aria-label": this.scLabel, class: classInfoContainerOutgoingLinkUrl, tabindex: "-1" }, index.h("span", { class: "label" }, this.outGoingUrlLabel), index.h("span", { class: "icon-wrapper" }, index.h("div", { class: "icon" }, index.h("hy-icon", { icon: 'hy-icon-arrow-to-right', size: 32 })))))))), this.relatedLinksBlockTitle && (index.h("div", { class: classRelatedInfoContainer }, index.h("div", { class: classRelatedInfoHeading }, index.h("a", { href: accordionItemHref, class: classRelatedInfoHeadingLink, tabindex: "-1" }, index.h("button", { "aria-expanded": "false", "aria-controls": `${titleAsId}--content`, class: classRelatedInfoHeadingButton, id: `${titleAsId}--title` }, index.h("span", { class: classRelatedInfoHeadingIcon }, index.h("hy-icon", { icon: 'hy-icon-caret-down', size: 14 })), this.relatedLinksBlockTitle, " (", relatedLinksCount, ")"))), index.h("div", { class: classRelatedInfoContent, "aria-labelledBy": `${titleAsId}--title`, id: `${titleAsId}--content`, role: "region", "aria-hidden": "true" }, this._relatedLinks.map((x) => {
|
|
220
|
-
let relatedLinkTarget = x.isExternal ? '_blank' : '_self';
|
|
221
|
-
return (index.h("a", { class: classRelatedInfoLink, href: x.url, target: target, "aria-label": relatedLinkTarget }, x.label));
|
|
222
|
-
}))))),
|
|
223
|
-
];
|
|
224
|
-
}
|
|
225
|
-
default: {
|
|
226
|
-
return (index.h("article", null, index.h("a", { class: classAttributes, href: this.url, target: target, "aria-label": this.scLabel }, index.h("div", { class: classInfoContainerAttributes }, index.h("div", { class: classInfoContainerHeader }, this.itemType), index.h("div", { class: classInfoContainerTitle }, this.itemTitle), index.h("div", { class: classInfoContainerLinkContainer }, index.h("span", { class: classInfoContainerLinkIcon }, index.h("hy-icon", { icon: 'hy-icon-link', size: 15 })), index.h("div", { class: classInfoContainerLink }, this.url)), this.itemDescription && (index.h("div", { class: classInfoContainerDescription, innerHTML: this.itemDescription }))))));
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
get el() { return index.getElement(this); }
|
|
231
|
-
static get watchers() { return {
|
|
232
|
-
"relatedLinks": ["relatedLinksWatcher"],
|
|
233
|
-
"additionalInfo": ["additionalInfoWatcher"],
|
|
234
|
-
"sourceSet": ["srcSetWatcher"]
|
|
235
|
-
}; }
|
|
236
|
-
};
|
|
237
|
-
HyListItem.style = hyListItemCss;
|
|
238
|
-
|
|
239
|
-
exports.hy_list_item = HyListItem;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-dd5e5023.js');
|
|
6
|
-
|
|
7
|
-
const hyLogoGridCss = ":root{--brand-main:#0e688b;--brand-main-soft:#b1e7ff;--brand-main-bright:#48c5f8;--brand-main-light:#107eab;--brand-main-active:#005379;--brand-main-dark:#003146;--brand-main-nearly-black:#000222;--link-blue:#0479a4;--link-disabled:#767676;--grayscale-white:#fff;--grayscale-slightly-gray:#fefefe;--grayscale-light:#f8f8f8;--grayscale-medium:#d2d2d2;--grayscale-background-box:#f5f5f5;--grayscale-tabs-border:#e6e6e6;--grayscale-background-arrow:#dfdfdf;--grayscale-medium-dark:#979797;--grayscale-dark:#555555;--grayscale-dark-text:#222222;--grayscale-black:#000000;--additional-red-light:#e5053a;--additional-red-dark:#a31621;--additional-purple-light:#420039;--additional-yellow:#f9a21a;--additional-skyblue:#48c5f8;--additional-orange:#d14600;--additional-green-light:#96ba3c;--additional-green-dark:#006400;--hover-gray:#eaeaea}*{-webkit-box-sizing:border-box;box-sizing:border-box}:root{--gutter-mobile:16px;--gutter-narrow:24px;--gutter-medium:24px;--gutter-wide:24px;--gutter-extrawide:32px}:root{--breakpoint-extrawide:75.0625rem;--breakpoint-max-width:75.0625rem;--breakpoint-medium:48rem;--breakpoint-narrow:30rem;--breakpoint-wide:60rem}.hy-logo-grid{padding:78px 0 92px}.hy-logo-grid__title{font-size:1.75rem;line-height:32px;letter-spacing:-0.7px;font-family:var(--main-font-family);margin:0 0 24px;text-transform:uppercase}@media (min-width: 30rem){.hy-logo-grid__title{font-size:2.125rem;line-height:40px;letter-spacing:-0.85px;margin:0 0 32px}}@media (min-width: 1601px){.without-sidebar .hy-logo-grid__title{font-size:2.625rem;line-height:48px;letter-spacing:-1.05px;margin:0 0 40px}}@media (min-width: 75.0625rem){.with-sidebar .hy-logo-grid__title{font-size:2.625rem;line-height:48px;letter-spacing:-1.05px;margin:0 0 40px}}.hy-logo-grid__images{display:grid;gap:24px 36px;grid-template-columns:repeat(2, 1fr);padding:0 8px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}@media (min-width: 30rem){.hy-logo-grid__images{grid-template-columns:repeat(3, 25%);padding:0;gap:28px 0}}@media (min-width: 60rem){.without-sidebar .hy-logo-grid__images{grid-template-columns:repeat(4, 20%);gap:32px 0}}@media (min-width: 75.0625rem){.without-sidebar .hy-logo-grid__images{gap:40px 0}}@media (min-width: 75.0625rem){.with-sidebar .hy-logo-grid__images{grid-template-columns:repeat(4, 20%);gap:32px 0}}@media (min-width: 1601px){.with-sidebar .hy-logo-grid__images{gap:40px 0}}.hy-logo-grid__figure{margin:0;padding:0;position:relative}.hy-logo-grid__figure:after{content:\"\";display:block;padding-bottom:100%}.hy-logo-grid__figure picture{position:absolute;inset:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;display:-webkit-box;display:-ms-flexbox;display:flex}.hy-logo-grid__figure img{max-width:100%;-o-object-fit:scale-down;object-fit:scale-down;height:100%}";
|
|
8
|
-
|
|
9
|
-
const HyLogoGridItem = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
}
|
|
13
|
-
render() {
|
|
14
|
-
const parsedImage = JSON.parse(this.image);
|
|
15
|
-
const parsedLink = this.link ? JSON.parse(this.link) : null;
|
|
16
|
-
return parsedImage.map(({ image_sources: sources, image_url: fallback_url, image_alt: alt }) => {
|
|
17
|
-
const parsedSources = JSON.parse(sources);
|
|
18
|
-
const elementContent = (index.h("figure", { class: "hy-logo-grid__figure" }, parsedSources && (index.h("picture", null, parsedSources.map(({ src, media, type, sizes }) => (index.h("source", { srcSet: src, media: media, type: type, sizes: sizes ? sizes : '' }))), index.h("img", { alt: alt, src: fallback_url }))), !parsedSources && index.h("img", { alt: alt, src: fallback_url })));
|
|
19
|
-
if (parsedLink) {
|
|
20
|
-
const { url, target } = parsedLink;
|
|
21
|
-
const targetValue = target === '_blank' ? target : '_self';
|
|
22
|
-
return (index.h("a", { href: url, target: targetValue, class: "hy-logo-grid__link" }, elementContent));
|
|
23
|
-
}
|
|
24
|
-
return elementContent;
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
HyLogoGridItem.style = hyLogoGridCss;
|
|
29
|
-
|
|
30
|
-
exports.hy_logo_grid_item = HyLogoGridItem;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-dd5e5023.js');
|
|
6
|
-
|
|
7
|
-
const hyLogoGridCss = ":root{--brand-main:#0e688b;--brand-main-soft:#b1e7ff;--brand-main-bright:#48c5f8;--brand-main-light:#107eab;--brand-main-active:#005379;--brand-main-dark:#003146;--brand-main-nearly-black:#000222;--link-blue:#0479a4;--link-disabled:#767676;--grayscale-white:#fff;--grayscale-slightly-gray:#fefefe;--grayscale-light:#f8f8f8;--grayscale-medium:#d2d2d2;--grayscale-background-box:#f5f5f5;--grayscale-tabs-border:#e6e6e6;--grayscale-background-arrow:#dfdfdf;--grayscale-medium-dark:#979797;--grayscale-dark:#555555;--grayscale-dark-text:#222222;--grayscale-black:#000000;--additional-red-light:#e5053a;--additional-red-dark:#a31621;--additional-purple-light:#420039;--additional-yellow:#f9a21a;--additional-skyblue:#48c5f8;--additional-orange:#d14600;--additional-green-light:#96ba3c;--additional-green-dark:#006400;--hover-gray:#eaeaea}*{-webkit-box-sizing:border-box;box-sizing:border-box}:root{--gutter-mobile:16px;--gutter-narrow:24px;--gutter-medium:24px;--gutter-wide:24px;--gutter-extrawide:32px}:root{--breakpoint-extrawide:75.0625rem;--breakpoint-max-width:75.0625rem;--breakpoint-medium:48rem;--breakpoint-narrow:30rem;--breakpoint-wide:60rem}.hy-logo-grid{padding:78px 0 92px}.hy-logo-grid__title{font-size:1.75rem;line-height:32px;letter-spacing:-0.7px;font-family:var(--main-font-family);margin:0 0 24px;text-transform:uppercase}@media (min-width: 30rem){.hy-logo-grid__title{font-size:2.125rem;line-height:40px;letter-spacing:-0.85px;margin:0 0 32px}}@media (min-width: 1601px){.without-sidebar .hy-logo-grid__title{font-size:2.625rem;line-height:48px;letter-spacing:-1.05px;margin:0 0 40px}}@media (min-width: 75.0625rem){.with-sidebar .hy-logo-grid__title{font-size:2.625rem;line-height:48px;letter-spacing:-1.05px;margin:0 0 40px}}.hy-logo-grid__images{display:grid;gap:24px 36px;grid-template-columns:repeat(2, 1fr);padding:0 8px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}@media (min-width: 30rem){.hy-logo-grid__images{grid-template-columns:repeat(3, 25%);padding:0;gap:28px 0}}@media (min-width: 60rem){.without-sidebar .hy-logo-grid__images{grid-template-columns:repeat(4, 20%);gap:32px 0}}@media (min-width: 75.0625rem){.without-sidebar .hy-logo-grid__images{gap:40px 0}}@media (min-width: 75.0625rem){.with-sidebar .hy-logo-grid__images{grid-template-columns:repeat(4, 20%);gap:32px 0}}@media (min-width: 1601px){.with-sidebar .hy-logo-grid__images{gap:40px 0}}.hy-logo-grid__figure{margin:0;padding:0;position:relative}.hy-logo-grid__figure:after{content:\"\";display:block;padding-bottom:100%}.hy-logo-grid__figure picture{position:absolute;inset:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;display:-webkit-box;display:-ms-flexbox;display:flex}.hy-logo-grid__figure img{max-width:100%;-o-object-fit:scale-down;object-fit:scale-down;height:100%}";
|
|
8
|
-
|
|
9
|
-
const HyLogoGrid = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
}
|
|
13
|
-
render() {
|
|
14
|
-
const HeadingVariant = this.headingVariant;
|
|
15
|
-
return (index.h("div", { class: "hy-logo-grid", role: "complementary" }, this.logoGridTitle && index.h(HeadingVariant, { class: "hy-logo-grid__title" }, this.logoGridTitle), index.h("div", { class: "hy-logo-grid__images" }, index.h("slot", null))));
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
HyLogoGrid.style = hyLogoGridCss;
|
|
19
|
-
|
|
20
|
-
exports.hy_logo_grid = HyLogoGrid;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-dd5e5023.js');
|
|
6
|
-
|
|
7
|
-
const hyMainContentWrapperCss = ":root{--brand-main:#0e688b;--brand-main-soft:#b1e7ff;--brand-main-bright:#48c5f8;--brand-main-light:#107eab;--brand-main-active:#005379;--brand-main-dark:#003146;--brand-main-nearly-black:#000222;--link-blue:#0479a4;--link-disabled:#767676;--grayscale-white:#fff;--grayscale-slightly-gray:#fefefe;--grayscale-light:#f8f8f8;--grayscale-medium:#d2d2d2;--grayscale-background-box:#f5f5f5;--grayscale-tabs-border:#e6e6e6;--grayscale-background-arrow:#dfdfdf;--grayscale-medium-dark:#979797;--grayscale-dark:#555555;--grayscale-dark-text:#222222;--grayscale-black:#000000;--additional-red-light:#e5053a;--additional-red-dark:#a31621;--additional-purple-light:#420039;--additional-yellow:#f9a21a;--additional-skyblue:#48c5f8;--additional-orange:#d14600;--additional-green-light:#96ba3c;--additional-green-dark:#006400;--hover-gray:#eaeaea}*{-webkit-box-sizing:border-box;box-sizing:border-box}:root{--gutter-mobile:16px;--gutter-narrow:24px;--gutter-medium:24px;--gutter-wide:24px;--gutter-extrawide:32px}:root{--breakpoint-extrawide:75.0625rem;--breakpoint-max-width:75.0625rem;--breakpoint-medium:48rem;--breakpoint-narrow:30rem;--breakpoint-wide:60rem}:host{display:block}.with-sidebar .hy-main-content-wrapper{margin:0 auto;max-width:100%;padding:0 1rem;position:relative}@media (min-width: 30rem){.with-sidebar .hy-main-content-wrapper{padding:0 2rem}}@media (min-width: 1601px){.with-sidebar .hy-main-content-wrapper{max-width:1216px;padding:0}}.without-sidebar .hy-main-content-wrapper{margin:0 auto;max-width:100%;padding:0 1rem;position:relative}@media (min-width: 30rem){.without-sidebar .hy-main-content-wrapper{padding:0 2rem}}@media (min-width: 75.0625rem){.without-sidebar .hy-main-content-wrapper{max-width:1216px;padding:0}}";
|
|
8
|
-
|
|
9
|
-
const HyMainContentWrapper = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
}
|
|
13
|
-
render() {
|
|
14
|
-
const classAttributes = ['hy-main-content-wrapper'].join(' ');
|
|
15
|
-
return (index.h(index.Host, null, index.h("div", { class: classAttributes }, index.h("slot", null))));
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
HyMainContentWrapper.style = hyMainContentWrapperCss;
|
|
19
|
-
|
|
20
|
-
exports.hy_main_content_wrapper = HyMainContentWrapper;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-dd5e5023.js');
|
|
6
|
-
|
|
7
|
-
const hyMainCss = ":root{--brand-main:#0e688b;--brand-main-soft:#b1e7ff;--brand-main-bright:#48c5f8;--brand-main-light:#107eab;--brand-main-active:#005379;--brand-main-dark:#003146;--brand-main-nearly-black:#000222;--link-blue:#0479a4;--link-disabled:#767676;--grayscale-white:#fff;--grayscale-slightly-gray:#fefefe;--grayscale-light:#f8f8f8;--grayscale-medium:#d2d2d2;--grayscale-background-box:#f5f5f5;--grayscale-tabs-border:#e6e6e6;--grayscale-background-arrow:#dfdfdf;--grayscale-medium-dark:#979797;--grayscale-dark:#555555;--grayscale-dark-text:#222222;--grayscale-black:#000000;--additional-red-light:#e5053a;--additional-red-dark:#a31621;--additional-purple-light:#420039;--additional-yellow:#f9a21a;--additional-skyblue:#48c5f8;--additional-orange:#d14600;--additional-green-light:#96ba3c;--additional-green-dark:#006400;--hover-gray:#eaeaea}*{-webkit-box-sizing:border-box;box-sizing:border-box}:root{--gutter-mobile:16px;--gutter-narrow:24px;--gutter-medium:24px;--gutter-wide:24px;--gutter-extrawide:32px}:root{--breakpoint-extrawide:75.0625rem;--breakpoint-max-width:75.0625rem;--breakpoint-medium:48rem;--breakpoint-narrow:30rem;--breakpoint-wide:60rem}.hy-main{display:-webkit-box;display:-ms-flexbox;display:flex;margin:0 auto;max-width:120.0625rem;padding:0;width:100%}.hy-main .layout-content{padding:0;width:100%}.hy-main .layout-user-login-page{padding:0 var(--gutter-medium);width:100%}.hy-main .layout-user-login-page div[id^=block-breadcrumbs]{display:none}.hy-main__common{position:relative}@media (min-width: 30rem){.hy-main__common .layout-content{margin:0 auto;width:100%}}@media (min-width: 75.0625rem){.hy-main__common .layout-content{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;width:80%}}@media (min-width: 1601px){.hy-main__common .layout-content{padding:0 2rem}}.hy-main__common .layout-sidebar-first{display:none}@media (min-width: 75.0625rem){.hy-main__common .layout-sidebar-first{background:-webkit-gradient(linear, right top, left top, from(#f5f5f5), to(#f8f8f8));background:linear-gradient(270deg, #f5f5f5 0%, #f8f8f8 100%);display:block;max-width:320px;-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;padding:var(--gutter-extrawide) 13px;width:20%;height:auto}.hy-main__common .layout-sidebar-first.menu-is-open{background:var(--grayscale-white);min-height:100vh;overflow:auto}}.hy-main__large .layout-content{padding:0;width:100%}@media (min-width: 75.0625rem){.hy-main__large .layout-content{padding:0 2rem}}";
|
|
8
|
-
|
|
9
|
-
const HyMain = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
this.hasSidebar = false;
|
|
13
|
-
}
|
|
14
|
-
render() {
|
|
15
|
-
const classAttributes = [
|
|
16
|
-
'hy-main',
|
|
17
|
-
this.hasSidebar ? 'with-sidebar' : 'without-sidebar',
|
|
18
|
-
this.hasSidebar ? 'hy-main__common' : 'hy-main__large',
|
|
19
|
-
].join(' ');
|
|
20
|
-
return (index.h("div", { class: classAttributes }, index.h("slot", null)));
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
HyMain.style = hyMainCss;
|
|
24
|
-
|
|
25
|
-
exports.hy_main = HyMain;
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-dd5e5023.js');
|
|
6
|
-
const utils = require('./utils-eeb7b089.js');
|
|
7
|
-
const index$1 = require('./index-314ad166.js');
|
|
8
|
-
|
|
9
|
-
const menuItemSidebarCss = ":root{--brand-main:#0e688b;--brand-main-soft:#b1e7ff;--brand-main-bright:#48c5f8;--brand-main-light:#107eab;--brand-main-active:#005379;--brand-main-dark:#003146;--brand-main-nearly-black:#000222;--link-blue:#0479a4;--link-disabled:#767676;--grayscale-white:#fff;--grayscale-slightly-gray:#fefefe;--grayscale-light:#f8f8f8;--grayscale-medium:#d2d2d2;--grayscale-background-box:#f5f5f5;--grayscale-tabs-border:#e6e6e6;--grayscale-background-arrow:#dfdfdf;--grayscale-medium-dark:#979797;--grayscale-dark:#555555;--grayscale-dark-text:#222222;--grayscale-black:#000000;--additional-red-light:#e5053a;--additional-red-dark:#a31621;--additional-purple-light:#420039;--additional-yellow:#f9a21a;--additional-skyblue:#48c5f8;--additional-orange:#d14600;--additional-green-light:#96ba3c;--additional-green-dark:#006400;--hover-gray:#eaeaea}*{-webkit-box-sizing:border-box;box-sizing:border-box}:root{--gutter-mobile:16px;--gutter-narrow:24px;--gutter-medium:24px;--gutter-wide:24px;--gutter-extrawide:32px}:root{--breakpoint-extrawide:75.0625rem;--breakpoint-max-width:75.0625rem;--breakpoint-medium:48rem;--breakpoint-narrow:30rem;--breakpoint-wide:60rem}.hy-menu-sidebar--container.sidebar-open .hy-menu-item-sidebar:not(.is-parent):not(.is-parent--sub-level) .hy-menu-item-sidebar__label,.hy-menu-sidebar--container.sidebar-open .hy-menu-item-sidebar:not(.is-parent):not(.is-parent--sub-level) .hy-menu-item__label__icon,.hy-menu-sidepanel--container.sidepanel-open .hy-menu-item-sidebar:not(.is-parent):not(.is-parent--sub-level) .hy-menu-item-sidebar__label,.hy-menu-sidepanel--container.sidepanel-open .hy-menu-item-sidebar:not(.is-parent):not(.is-parent--sub-level) .hy-menu-item__label__icon{background:-webkit-gradient(linear, right top, left top, from(#f5f5f5), to(#f8f8f8));background:linear-gradient(270deg, #f5f5f5 0%, #f8f8f8 100%)}.hy-menu-sidebar--container.sidebar-open .hy-menu-item-sidebar.is-parent .hy-menu-item-sidebar__label,.hy-menu-sidepanel--container.sidepanel-open .hy-menu-item-sidebar.is-parent .hy-menu-item-sidebar__label{background-color:none !important}.hy-menu-sidebar--container.sidebar-open .hy-menu-item-sidebar:not(.is-parent) .hy-menu-item-sidebar__label:hover,.hy-menu-sidepanel--container.sidepanel-open .hy-menu-item-sidebar:not(.is-parent) .hy-menu-item-sidebar__label:hover{background:var(--hover-gray) !important;text-decoration:underline}.hy-menu-sidebar--container.sidebar-open .hy-menu-item-sidebar:not(.is-parent) .hy-menu-item__label__icon:not([aria-expanded=true]):hover,.hy-menu-sidepanel--container.sidepanel-open .hy-menu-item-sidebar:not(.is-parent) .hy-menu-item__label__icon:not([aria-expanded=true]):hover{background:var(--hover-gray) !important;cursor:pointer}.hy-menu-sidebar--container.sidebar-open .hy-menu-item-sidebar:not(.is-parent) .hy-menu-item__label__icon:not([aria-expanded=true]):hover svg,.hy-menu-sidepanel--container.sidepanel-open .hy-menu-item-sidebar:not(.is-parent) .hy-menu-item__label__icon:not([aria-expanded=true]):hover svg{width:22px;height:22px}.hy-menu-sidebar--container.sidebar-open .hy-menu-item-sidebar:not(.is-parent) .hy-menu-item__label__icon[aria-expanded=true]:hover,.hy-menu-sidepanel--container.sidepanel-open .hy-menu-item-sidebar:not(.is-parent) .hy-menu-item__label__icon[aria-expanded=true]:hover{background:var(--brand-main);cursor:pointer;-webkit-transition:all 0.25s ease;transition:all 0.25s ease}.hy-menu-sidebar--container.sidebar-open .hy-menu-item-sidebar:not(.is-parent) .hy-menu-item__label__icon[aria-expanded=true]:hover .hy-menu-item__label__icon__svg,.hy-menu-sidepanel--container.sidepanel-open .hy-menu-item-sidebar:not(.is-parent) .hy-menu-item__label__icon[aria-expanded=true]:hover .hy-menu-item__label__icon__svg{-webkit-transform:rotate(180deg) translateX(2px);transform:rotate(180deg) translateX(2px)}.hy-menu-sidebar--container.sidebar-open .hy-menu-item-sidebar:not(.is-parent) .hy-menu-item__label__icon[aria-expanded=true]:hover svg,.hy-menu-sidepanel--container.sidepanel-open .hy-menu-item-sidebar:not(.is-parent) .hy-menu-item__label__icon[aria-expanded=true]:hover svg{width:22px;height:22px}.hy-menu-sidebar--container:not(.sidebar-open) .hy-menu-item-sidebar:not(.is-parent) .hy-menu-item-sidebar__label:hover{border:1px solid var(--brand-main);margin:-1px;text-decoration:underline}.hy-menu-sidebar--container:not(.sidebar-open) .hy-menu-item-sidebar:not(.is-parent) .hy-menu-item__label__icon:hover{border:1px solid var(--brand-main);margin:-1px;margin-left:7px;text-decoration:underline;cursor:pointer}.hy-menu-sidebar--container:not(.sidebar-open) .hy-menu-item-sidebar:not(.is-parent) .hy-menu-item__label__icon:hover svg{width:22px;height:22px}.hy-menu-item-sidebar{list-style-type:none;margin-bottom:6px;}.hy-menu-item-sidebar--label-container{font-size:0.875rem;line-height:20px;font-weight:600;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--brand-main-light);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--main-font-family);-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;min-height:48px;padding:0;word-break:break-word}@media (min-width: 1601px){.hy-menu-item-sidebar--label-container{font-size:1rem;line-height:22px}}.hy-menu-item-sidebar:focus{outline-offset:4px}.hy-menu-item-sidebar>.hy-menu-level-container.hy-menu-level-container--sidepanel{display:none}.hy-menu-item-sidebar.hy-menu-item-sidebar--sidepanel.in-active-trail>.hy-menu-item-sidebar--label-container{border:1px solid var(--brand-main-light);text-decoration:none}.hy-menu-item-sidebar.hy-menu-item-sidebar--sidepanel.in-active-trail>.hy-menu-item-sidebar--label-container>.hy-menu-item__label__icon{background-color:var(--brand-main-light);border:none}.hy-menu-item-sidebar.hy-menu-item-sidebar--sidepanel.in-active-trail>.hy-menu-item-sidebar--label-container>.hy-menu-item__label__icon svg{fill:var(--grayscale-white)}.hy-menu-item-sidebar.hy-menu-item-sidebar--sidepanel.in-active-trail>.hy-menu-level-container--sidepanel{display:-webkit-box;display:-ms-flexbox;display:flex}.hy-menu-item-sidebar:not(.is-parent):not(.is-parent--sub-level).is-active-item>.hy-menu-item-sidebar--label-container{background:var(--grayscale-white) !important;text-decoration:none}.hy-menu-item-sidebar:not(.is-parent):not(.is-parent--sub-level).is-active-item>.hy-menu-item-sidebar--label-container>a.hy-menu-item-sidebar__label{border:1px solid var(--brand-main-light);border-right:0}.hy-menu-item-sidebar:not(.is-parent):not(.is-parent--sub-level).is-active-item>.hy-menu-item-sidebar--label-container>.hy-menu-item__label__icon{background:var(--brand-main-light);border:none;margin-left:4px}.hy-menu-item-sidebar:not(.is-parent):not(.is-parent--sub-level).is-active-item>.hy-menu-item-sidebar--label-container>.hy-menu-item__label__icon svg{fill:var(--grayscale-white)}.hy-menu-item-sidebar__label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--grayscale-white);color:var(--brand-main-light);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;padding:8px 10px 8px 20px;text-decoration:none;width:100%;word-break:break-word}.hy-menu-item-sidebar__label:focus{outline:none;-webkit-box-shadow:0 0 1px 1px rgba(55, 148, 224, 0.5);box-shadow:0 0 1px 1px rgba(55, 148, 224, 0.5);border-radius:none}.hy-menu-item-sidebar .hy-menu-item__label__icon{border-top:0;border-right:0;border-bottom:0;background:var(--grayscale-white);border-left:1px solid var(--brand-main-light);color:var(--brand-main-light);display:inline-block;position:relative;width:61.5px;margin-left:6px;min-height:48px}.hy-menu-item-sidebar .hy-menu-item__label__icon svg{position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.hy-menu-item-sidebar .hy-menu-item__label__icon:focus{outline:none;-webkit-box-shadow:0 0 1px 1px rgba(55, 148, 224, 0.5);box-shadow:0 0 1px 1px rgba(55, 148, 224, 0.5);border-radius:none}.hy-menu-item-sidebar.is-parent{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;margin-bottom:10px;max-width:280px;padding-bottom:10px;width:calc(100% - 25px)}.hy-menu-item-sidebar.is-parent .hy-menu-item-sidebar--label-container{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:none;border:none;color:var(--brand-main-light);display:-webkit-box;display:-ms-flexbox;display:flex}.hy-menu-item-sidebar.is-parent .hy-menu-item-sidebar--label-container .hy-menu-item-sidebar__label{font-size:1.625rem;line-height:26px;background-color:transparent !important;font-family:var(--main-font-family);font-weight:bold;letter-spacing:-0.81px;padding:0;text-decoration:none;text-transform:uppercase}.hy-menu-item-sidebar.is-parent:hover span{background:none;border:none;margin:0}.hy-menu-item-sidebar.is-parent:hover a{border:none;color:var(--brand-main) !important;text-decoration:underline;margin:0}.hy-menu-item-sidebar.is-parent:hover .hy-menu-item__parent__icon__svg{fill:var(--brand-main-nearly-black)}.hy-menu-item-sidebar.is-parent .hy-menu-item__parent__icon{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;height:26px}.hy-menu-item-sidebar.is-parent .hy-menu-item__parent__icon__svg svg{fill:var(--brand-main-light)}.hy-menu-item-sidebar.is-parent.is-parent--sub-level{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;background:none;border-bottom:1px solid var(--brand-main-light);display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:12px;padding-bottom:18px;position:absolute;-webkit-transform:translateY(calc(-100% - 12px));transform:translateY(calc(-100% - 12px));width:calc(100% - 25px)}.hy-menu-item-sidebar.is-parent.is-parent--sub-level .hy-menu-item-parent__icon{bottom:20px;left:-20px;position:absolute}.hy-menu-item-sidebar.is-parent.is-parent--sub-level *{text-transform:uppercase}.hy-menu-item-sidebar.is-parent.is-parent--sub-level svg{fill:var(--brand-main-light)}.hy-menu-item-sidebar.is-parent.is-parent--sub-level .hy-menu-item-sidebar__label:hover{background:none !important;text-decoration:underline}.hy-menu-item-sidebar.is-parent.is-parent--sub-level>.hy-menu-item-sidebar--label-container{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;margin:0 0 0 0.5rem;padding:0}.hy-menu-item-sidebar.is-current-page span.hy-menu-item-sidebar__label{border-left:4px solid var(--grayscale-black);color:var(--grayscale-black);padding:8px 10px 8px 6px !important}.hy-menu-item-sidebar.is-current-page.is-parent .hy-menu-item__parent__icon{display:none}";
|
|
10
|
-
|
|
11
|
-
const MenuItemSidebar = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
index.registerInstance(this, hostRef);
|
|
14
|
-
this.addBreadcrumb = index.createEvent(this, "addBreadcrumb", 7);
|
|
15
|
-
this.menuContainerActiveTrail = index.createEvent(this, "menuContainerActiveTrail", 7);
|
|
16
|
-
this.menuContainerToggled = index.createEvent(this, "menuContainerToggled", 7);
|
|
17
|
-
this.routeClicked = index.createEvent(this, "routeClicked", 7);
|
|
18
|
-
this.inActiveTrail = false;
|
|
19
|
-
this.isActive = false;
|
|
20
|
-
this.isActiveChild = false;
|
|
21
|
-
this.isHeading = false;
|
|
22
|
-
this.isParent = false;
|
|
23
|
-
this.isDemo = false;
|
|
24
|
-
this.menuItemAlternative = false;
|
|
25
|
-
this.menuLinkId = '';
|
|
26
|
-
this.menuType = utils.MenuType.sidenav;
|
|
27
|
-
this.pageSize = utils.MenuType.mobile;
|
|
28
|
-
this.menuButtonSubmenuExpand = '';
|
|
29
|
-
this.menuIsOpen = false;
|
|
30
|
-
this.ariaExpanded = false;
|
|
31
|
-
this.depth = 0;
|
|
32
|
-
this.hasChildren = null;
|
|
33
|
-
this.label = '';
|
|
34
|
-
this.parentAsHeading = '';
|
|
35
|
-
this.parentExpanded = false;
|
|
36
|
-
this.url = '';
|
|
37
|
-
}
|
|
38
|
-
sidebarTopLevelToggle(e) {
|
|
39
|
-
if (this.depth !== 0) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
const body = document.querySelector('body');
|
|
43
|
-
const container = document.querySelector('.hy-menu-sidebar--container');
|
|
44
|
-
const menuItem = e.target.closest('.hy-menu-item-sidebar');
|
|
45
|
-
if (container.classList.contains('sidebar-open') && menuItem.classList.contains('is-active-item')) {
|
|
46
|
-
container.classList.remove('sidebar-open');
|
|
47
|
-
body.classList.remove('hy-menu-sidebar__no-scroll');
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
container.classList.add('sidebar-open');
|
|
51
|
-
body.classList.add('hy-menu-sidebar__no-scroll');
|
|
52
|
-
}
|
|
53
|
-
e.preventDefault();
|
|
54
|
-
}
|
|
55
|
-
async componentWillLoad() {
|
|
56
|
-
this.ro = new index$1.ResizeObserver((entries) => {
|
|
57
|
-
for (const entry of entries) {
|
|
58
|
-
this.applySize(entry.contentRect.width);
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
this.ro.observe(document.body);
|
|
62
|
-
// If is-active class is added by system, add it to menu component as well.
|
|
63
|
-
if (this.el.classList.contains('is-active')) {
|
|
64
|
-
this.isActive = true;
|
|
65
|
-
}
|
|
66
|
-
// If current menu item is active, trigger all parent menuLevelContainer
|
|
67
|
-
// elements in the same active-trail to open the menu.
|
|
68
|
-
if (this.isActive) {
|
|
69
|
-
const getParents = (elem) => {
|
|
70
|
-
let parents = [];
|
|
71
|
-
while (elem.parentNode && elem.parentNode.nodeName.toLowerCase() != 'hy-menu-sidebar') {
|
|
72
|
-
elem = elem.parentNode;
|
|
73
|
-
parents.push(elem);
|
|
74
|
-
}
|
|
75
|
-
return parents;
|
|
76
|
-
};
|
|
77
|
-
const parents = getParents(this.el);
|
|
78
|
-
for (let i = 0; i < parents.length; i++) {
|
|
79
|
-
const element = parents[i];
|
|
80
|
-
if (element.tagName.toLowerCase() === 'hy-menu-item-sidebar') {
|
|
81
|
-
element.classList.add('is-hidden--child');
|
|
82
|
-
this.menuContainerActiveTrail.emit({
|
|
83
|
-
triggerItem: element.getAttribute('menu-link-id'),
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
// If current active menu item have children, set the child
|
|
88
|
-
// menu-level-container open.
|
|
89
|
-
if (this.el.children.length > 0) {
|
|
90
|
-
this.el.children[0].setAttribute('class', 'is-open-on-top');
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
if (this.inActiveTrail) {
|
|
94
|
-
const currentParent = this.el.parentNode;
|
|
95
|
-
if (this.menuType === utils.MenuType.sidepanel) {
|
|
96
|
-
currentParent.classList.add('is-open');
|
|
97
|
-
const childList = this.el.querySelector('.hy-menu-level-container');
|
|
98
|
-
if (childList) {
|
|
99
|
-
childList.classList.add('is-open');
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
// Assign depth value to current menu item instance; 1st level, 2nd level, etc.
|
|
104
|
-
this.hasChildren = this.el.getElementsByTagName('hy-menu-level-container').length >= 1;
|
|
105
|
-
if (this.menuType === utils.MenuType.sidenav) {
|
|
106
|
-
let parentMenuItem = this.el.closest('hy-menu-item-sidebar');
|
|
107
|
-
let nextParentMenuItem;
|
|
108
|
-
if (parentMenuItem) {
|
|
109
|
-
nextParentMenuItem = parentMenuItem.parentElement.closest('hy-menu-item-sidebar');
|
|
110
|
-
if (nextParentMenuItem === parentMenuItem) {
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
else {
|
|
114
|
-
if (nextParentMenuItem !== null) {
|
|
115
|
-
this.parentAsHeading = nextParentMenuItem;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
applySize(size) {
|
|
122
|
-
// Set the menu-type based on the width of the browser.
|
|
123
|
-
if (size <= 960) {
|
|
124
|
-
this.pageSize = utils.MenuType.mobile;
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
this.pageSize = utils.MenuType.desktop;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
componentWillRender() {
|
|
131
|
-
if (this.pageSize === utils.MenuType.mobile)
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
render() {
|
|
135
|
-
let classAttributes = [
|
|
136
|
-
'hy-menu-item-sidebar',
|
|
137
|
-
this.menuType ? `hy-menu-item-sidebar--${this.menuType}` : '',
|
|
138
|
-
this.depth != null ? 'hy-menu-item--level-' + this.depth : '',
|
|
139
|
-
this.isDemo ? 'is-demo' : '',
|
|
140
|
-
this.isActive ? 'is-current-page' : '',
|
|
141
|
-
this.isParent ? 'is-parent' : '',
|
|
142
|
-
this.hasChildren ? 'has-children' : '',
|
|
143
|
-
this.inActiveTrail ? 'is-active-item' : '',
|
|
144
|
-
this.isActive && this.hasChildren ? 'is-active--heading' : '',
|
|
145
|
-
];
|
|
146
|
-
let anchorClassAttributes = ['hy-menu-item-sidebar__label'];
|
|
147
|
-
classAttributes = [...classAttributes];
|
|
148
|
-
if (this.url) {
|
|
149
|
-
return (index.h("li", { "data-link-id": `menu-link-sidebar-${this.menuLinkId}`, class: classAttributes.join(' '), "aria-current": this.isActive ? 'true' : 'false', "item-level": this.depth }, this.isParent && (index.h("span", { class: 'hy-menu-item__parent__icon' }, index.h("hy-icon", { class: 'hy-menu-item__parent__icon__svg', icon: 'hy-icon-caret-left', fill: 'currentColor', size: 10 }))), index.h("div", { class: "hy-menu-item-sidebar--label-container" }, this.isActive ? (index.h("span", { class: anchorClassAttributes.join(' ') }, this.label)) : (index.h("a", { class: anchorClassAttributes.join(' '), href: this.url }, this.label)), this.hasChildren && (index.h("button", { "aria-labelledby": this.label, "aria-expanded": this.inActiveTrail && !this.isActive ? 'true' : 'false', type: "button", class: 'hy-menu-item__label__icon', onClick: (e) => this.sidebarTopLevelToggle(e) }, index.h("hy-icon", { class: 'hy-menu-item__label__icon__svg', icon: 'hy-icon-caret-right', fill: 'currentColor', size: 18 })))), this.hasChildren && index.h("slot", null)));
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
get el() { return index.getElement(this); }
|
|
156
|
-
};
|
|
157
|
-
MenuItemSidebar.style = menuItemSidebarCss;
|
|
158
|
-
|
|
159
|
-
exports.hy_menu_item_sidebar = MenuItemSidebar;
|