hr-design-system-handlebars 0.44.4 → 0.45.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/.storybook/preview.js +1 -1
- package/CHANGELOG.md +12 -0
- package/dist/assets/index.css +31 -37
- package/dist/views/components/base/load_dynamic.hbs +2 -2
- package/dist/views/components/{Header/AnchorNavigation/AnchorNavigation.hbs → header/anchor_navigation/anchor_navigation.hbs} +0 -0
- package/dist/views/components/{Header/AnchorNavigation/FeatureBoxAnchor.hbs → header/anchor_navigation/featurebox_anchor.hbs} +0 -0
- package/{src/stories/views/components/Header/BrandNavigation/BrandNavigation.hbs → dist/views/components/header/brand_navigation/brand_navigation.hbs} +1 -1
- package/dist/views/components/{Header/BrandNavigation/BrandNavigationItem.hbs → header/brand_navigation/brand_navigation_item.hbs} +0 -0
- package/dist/views/components/{Header/Burger.hbs → header/burger.hbs} +2 -1
- package/dist/views/components/header/header.hbs +85 -0
- package/dist/views/components/header/header_alpine.js +255 -0
- package/dist/views/components/{Header/NavigationFlyout/NavigationFlyout.hbs → header/navigation_flyout/navigation_flyout.hbs} +2 -2
- package/dist/views/components/{Header/NavigationFlyout/NavigationFlyoutColumn.hbs → header/navigation_flyout/navigation_flyout_column.hbs} +1 -1
- package/dist/views/components/{Header/NavigationFlyout/NavigationFlyoutItem.hbs → header/navigation_flyout/navigation_flyout_item.hbs} +0 -0
- package/dist/views/components/{Header/Search/QuickSearchButton.hbs → header/search/quick_search_button.hbs} +0 -0
- package/dist/views/components/{Header/Search/QuickSearchForm.hbs → header/search/quick_search_form.hbs} +0 -0
- package/dist/views/components/{Header/SectionNavigation/SectionNavigation.hbs → header/section_navigation/section_navigation.hbs} +2 -2
- package/{src/stories/views/components/Header/SectionNavigation/SectionNavigationItem.hbs → dist/views/components/header/section_navigation/section_navigation_item.hbs} +2 -2
- package/dist/views/components/{Header/ServiceLogo.hbs → header/service_logo.hbs} +0 -0
- package/dist/views/components/{Header/ServiceNavigation/ServiceList.hbs → header/service_navigation/service_list.hbs} +1 -1
- package/dist/views/components/{Header/ServiceNavigation/ServiceNavigationItem.hbs → header/service_navigation/service_navigation_item.hbs} +1 -1
- package/dist/views/components/page/page.hbs +1 -1
- package/package.json +1 -1
- package/src/stories/views/components/base/load_dynamic.hbs +2 -2
- package/src/stories/views/components/{Header/AnchorNavigation/AnchorNavigation.hbs → header/anchor_navigation/anchor_navigation.hbs} +0 -0
- package/src/stories/views/components/{Header/AnchorNavigation/FeatureBoxAnchor.hbs → header/anchor_navigation/featurebox_anchor.hbs} +0 -0
- package/src/stories/views/components/{Header → header}/brandNavigationData.json +0 -0
- package/{dist/views/components/Header/BrandNavigation/BrandNavigation.hbs → src/stories/views/components/header/brand_navigation/brand_navigation.hbs} +1 -1
- package/src/stories/views/components/{Header/BrandNavigation/BrandNavigation.stories.mdx → header/brand_navigation/brand_navigation.stories.mdx} +1 -1
- package/src/stories/views/components/{Header/BrandNavigation/BrandNavigationItem.hbs → header/brand_navigation/brand_navigation_item.hbs} +0 -0
- package/src/stories/views/components/{Header/BrandNavigation/BrandNavigationItem.stories.mdx → header/brand_navigation/brand_navigation_item.stories.mdx} +1 -1
- package/src/stories/views/components/{Header/Burger.hbs → header/burger.hbs} +2 -1
- package/src/stories/views/components/header/header.hbs +85 -0
- package/src/stories/views/components/{Header/Header.stories.mdx → header/header_.stories.mdx} +1 -1
- package/src/stories/views/components/header/header_alpine.js +255 -0
- package/src/stories/views/components/{Header → header}/navigation.json +0 -0
- package/src/stories/views/components/{Header → header}/navigation2.json +0 -0
- package/src/stories/views/components/{Header → header}/navigation3.json +0 -0
- package/src/stories/views/components/{Header → header}/navigation4.json +0 -0
- package/src/stories/views/components/{Header/NavigationFlyout/NavigationFlyout.hbs → header/navigation_flyout/navigation_flyout.hbs} +2 -2
- package/src/stories/views/components/{Header/NavigationFlyout/NavigationFlyout.stories.mdx → header/navigation_flyout/navigation_flyout.stories.mdx} +1 -1
- package/src/stories/views/components/{Header/NavigationFlyout/NavigationFlyoutColumn.hbs → header/navigation_flyout/navigation_flyout_column.hbs} +1 -1
- package/src/stories/views/components/{Header/NavigationFlyout/NavigationFlyoutItem.hbs → header/navigation_flyout/navigation_flyout_item.hbs} +0 -0
- package/src/stories/views/components/{Header/Search/QuickSearchButton.hbs → header/search/quick_search_button.hbs} +0 -0
- package/src/stories/views/components/{Header/Search/QuickSearchButton.stories.mdx → header/search/quick_search_button.stories.mdx} +1 -1
- package/src/stories/views/components/{Header/Search/QuickSearchForm.hbs → header/search/quick_search_form.hbs} +0 -0
- package/src/stories/views/components/{Header/Search/QuickSearchForm.stories.mdx → header/search/quick_search_form.stories.mdx} +1 -1
- package/src/stories/views/components/{Header → header}/sectionNavigationData.json +0 -0
- package/src/stories/views/components/{Header/SectionNavigation/SectionNavigation.hbs → header/section_navigation/section_navigation.hbs} +2 -2
- package/src/stories/views/components/{Header/SectionNavigation/SectionNavigation.stories.mdx → header/section_navigation/section_navigation.stories.mdx} +1 -1
- package/{dist/views/components/Header/SectionNavigation/SectionNavigationItem.hbs → src/stories/views/components/header/section_navigation/section_navigation_item.hbs} +2 -2
- package/src/stories/views/components/{Header/SectionNavigation/SectionNavigationItem.stories.mdx → header/section_navigation/section_navigation_item.stories.mdx} +1 -1
- package/src/stories/views/components/{Header → header}/serviceNavigationData.json +0 -0
- package/src/stories/views/components/{Header/ServiceLogo.hbs → header/service_logo.hbs} +0 -0
- package/src/stories/views/components/{Header/ServiceNavigation/ServiceList.hbs → header/service_navigation/service_list.hbs} +1 -1
- package/src/stories/views/components/{Header/ServiceNavigation/ServiceList.stories.mdx → header/service_navigation/service_list.stories.mdx} +1 -1
- package/src/stories/views/components/{Header/ServiceNavigation/ServiceNavigationItem.hbs → header/service_navigation/service_navigation_item.hbs} +1 -1
- package/src/stories/views/components/{Header/ServiceNavigation/ServiceNavigationItem.stories.mdx → header/service_navigation/service_navigation_item.stories.mdx} +1 -1
- package/src/stories/views/components/page/page.hbs +1 -1
- package/src/stories/views/components/page/page.stories.mdx +4 -4
- package/dist/views/components/Header/Header.hbs +0 -343
- package/src/stories/views/components/Header/Header.hbs +0 -343
package/.storybook/preview.js
CHANGED
|
@@ -8,7 +8,7 @@ import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
|
|
|
8
8
|
|
|
9
9
|
import Initializer from '../build/webpack/feature-loader/initializer/initializer'
|
|
10
10
|
import loadFeature from '../build/webpack/feature-loader/initializer/loader'
|
|
11
|
-
|
|
11
|
+
import 'components/header/header_alpine'
|
|
12
12
|
|
|
13
13
|
function loadDelayedImages(){setTimeout((function(){var t,e=document.images,s=[],a=function(t){void 0!==window.picturefill&&window.picturefill({reevaluate:!0,elements:t})};for(var i=0;i<e.length;++i)(t=e[i].dataset?e[i].dataset.srcset:e[i].getAttribute("data-srcset"))&&(0===e[i].getBoundingClientRect().top?s.push(e[i]):e[i].setAttribute("srcset",t));a(e),setTimeout((function(){var t;for(var i=0;i<s.length;++i)t=s[i].dataset?s[i].dataset.srcset:s[i].getAttribute("data-srcset"),s[i].setAttribute("srcset",t);a(s)}),900)}),0)}
|
|
14
14
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# v0.45.0 (Thu May 12 2022)
|
|
2
|
+
|
|
3
|
+
#### 🚀 Enhancement
|
|
4
|
+
|
|
5
|
+
- Externalise script from header.hbs & renaming of header components [#231](https://github.com/mumprod/hr-design-system-handlebars/pull/231) ([@StefanVesper](https://github.com/StefanVesper))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- SonicSoulSurfer ([@StefanVesper](https://github.com/StefanVesper))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
1
13
|
# v0.44.4 (Mon May 09 2022)
|
|
2
14
|
|
|
3
15
|
#### 🐛 Bug Fix
|
package/dist/assets/index.css
CHANGED
|
@@ -1472,9 +1472,6 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
1472
1472
|
white-space: nowrap;
|
|
1473
1473
|
border-width: 0;
|
|
1474
1474
|
}
|
|
1475
|
-
.visible {
|
|
1476
|
-
visibility: visible;
|
|
1477
|
-
}
|
|
1478
1475
|
.fixed {
|
|
1479
1476
|
position: fixed;
|
|
1480
1477
|
}
|
|
@@ -1806,9 +1803,6 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
1806
1803
|
.cursor-pointer {
|
|
1807
1804
|
cursor: pointer;
|
|
1808
1805
|
}
|
|
1809
|
-
.resize {
|
|
1810
|
-
resize: both;
|
|
1811
|
-
}
|
|
1812
1806
|
.list-none {
|
|
1813
1807
|
list-style-type: none;
|
|
1814
1808
|
}
|
|
@@ -2008,21 +2002,6 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
2008
2002
|
--tw-bg-opacity: 1;
|
|
2009
2003
|
background-color: rgba(187, 247, 208, var(--tw-bg-opacity));
|
|
2010
2004
|
}
|
|
2011
|
-
.bg-current {
|
|
2012
|
-
background-color: currentColor;
|
|
2013
|
-
}
|
|
2014
|
-
.bg-white {
|
|
2015
|
-
--tw-bg-opacity: 1;
|
|
2016
|
-
background-color: rgba(255, 255, 255, var(--tw-bg-opacity));
|
|
2017
|
-
}
|
|
2018
|
-
.bg-blue-congress {
|
|
2019
|
-
--tw-bg-opacity: 1;
|
|
2020
|
-
background-color: rgba(0, 82, 147, var(--tw-bg-opacity));
|
|
2021
|
-
}
|
|
2022
|
-
.bg-gray-800 {
|
|
2023
|
-
--tw-bg-opacity: 1;
|
|
2024
|
-
background-color: rgba(31, 41, 55, var(--tw-bg-opacity));
|
|
2025
|
-
}
|
|
2026
2005
|
.bg-gray-100 {
|
|
2027
2006
|
--tw-bg-opacity: 1;
|
|
2028
2007
|
background-color: rgba(243, 244, 246, var(--tw-bg-opacity));
|
|
@@ -2035,6 +2014,10 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
2035
2014
|
--tw-bg-opacity: 1;
|
|
2036
2015
|
background-color: rgba(107, 114, 128, var(--tw-bg-opacity));
|
|
2037
2016
|
}
|
|
2017
|
+
.bg-white {
|
|
2018
|
+
--tw-bg-opacity: 1;
|
|
2019
|
+
background-color: rgba(255, 255, 255, var(--tw-bg-opacity));
|
|
2020
|
+
}
|
|
2038
2021
|
.bg-blue-200 {
|
|
2039
2022
|
--tw-bg-opacity: 1;
|
|
2040
2023
|
background-color: rgba(191, 219, 254, var(--tw-bg-opacity));
|
|
@@ -2047,6 +2030,17 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
2047
2030
|
--tw-bg-opacity: 1;
|
|
2048
2031
|
background-color: rgba(248, 113, 113, var(--tw-bg-opacity));
|
|
2049
2032
|
}
|
|
2033
|
+
.bg-current {
|
|
2034
|
+
background-color: currentColor;
|
|
2035
|
+
}
|
|
2036
|
+
.bg-blue-congress {
|
|
2037
|
+
--tw-bg-opacity: 1;
|
|
2038
|
+
background-color: rgba(0, 82, 147, var(--tw-bg-opacity));
|
|
2039
|
+
}
|
|
2040
|
+
.bg-gray-800 {
|
|
2041
|
+
--tw-bg-opacity: 1;
|
|
2042
|
+
background-color: rgba(31, 41, 55, var(--tw-bg-opacity));
|
|
2043
|
+
}
|
|
2050
2044
|
.bg-labelMedia {
|
|
2051
2045
|
background-color: #006dc1;
|
|
2052
2046
|
background-color: var(--color-label-media);
|
|
@@ -2112,18 +2106,6 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
2112
2106
|
.p-2 {
|
|
2113
2107
|
padding: 0.5rem;
|
|
2114
2108
|
}
|
|
2115
|
-
.px-5 {
|
|
2116
|
-
padding-left: 1.25rem;
|
|
2117
|
-
padding-right: 1.25rem;
|
|
2118
|
-
}
|
|
2119
|
-
.py-3\.5 {
|
|
2120
|
-
padding-top: 0.875rem;
|
|
2121
|
-
padding-bottom: 0.875rem;
|
|
2122
|
-
}
|
|
2123
|
-
.py-3 {
|
|
2124
|
-
padding-top: 0.75rem;
|
|
2125
|
-
padding-bottom: 0.75rem;
|
|
2126
|
-
}
|
|
2127
2109
|
.py-6 {
|
|
2128
2110
|
padding-top: 1.5rem;
|
|
2129
2111
|
padding-bottom: 1.5rem;
|
|
@@ -2136,6 +2118,18 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
2136
2118
|
padding-top: 2rem;
|
|
2137
2119
|
padding-bottom: 2rem;
|
|
2138
2120
|
}
|
|
2121
|
+
.px-5 {
|
|
2122
|
+
padding-left: 1.25rem;
|
|
2123
|
+
padding-right: 1.25rem;
|
|
2124
|
+
}
|
|
2125
|
+
.py-3\.5 {
|
|
2126
|
+
padding-top: 0.875rem;
|
|
2127
|
+
padding-bottom: 0.875rem;
|
|
2128
|
+
}
|
|
2129
|
+
.py-3 {
|
|
2130
|
+
padding-top: 0.75rem;
|
|
2131
|
+
padding-bottom: 0.75rem;
|
|
2132
|
+
}
|
|
2139
2133
|
.px-1\.5 {
|
|
2140
2134
|
padding-left: 0.375rem;
|
|
2141
2135
|
padding-right: 0.375rem;
|
|
@@ -2317,14 +2311,14 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
2317
2311
|
--tw-text-opacity: 1 !important;
|
|
2318
2312
|
color: rgba(20, 83, 45, var(--tw-text-opacity)) !important;
|
|
2319
2313
|
}
|
|
2320
|
-
.text-blue-congress {
|
|
2321
|
-
--tw-text-opacity: 1;
|
|
2322
|
-
color: rgba(0, 82, 147, var(--tw-text-opacity));
|
|
2323
|
-
}
|
|
2324
2314
|
.text-white {
|
|
2325
2315
|
--tw-text-opacity: 1;
|
|
2326
2316
|
color: rgba(255, 255, 255, var(--tw-text-opacity));
|
|
2327
2317
|
}
|
|
2318
|
+
.text-blue-congress {
|
|
2319
|
+
--tw-text-opacity: 1;
|
|
2320
|
+
color: rgba(0, 82, 147, var(--tw-text-opacity));
|
|
2321
|
+
}
|
|
2328
2322
|
.text-grey-scorpion {
|
|
2329
2323
|
--tw-text-opacity: 1;
|
|
2330
2324
|
color: rgba(96, 96, 96, var(--tw-text-opacity));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{{#switch templatePath}}
|
|
2
|
-
{{#case "components/
|
|
3
|
-
{{> components/
|
|
2
|
+
{{#case "components/header/service_navigation/service_navigation_item"}}
|
|
3
|
+
{{> components/header/service_navigation/service_navigation_item}}
|
|
4
4
|
{{/case}}
|
|
5
5
|
{{#case "components/teaser/group_teaser/group_teaser"}}
|
|
6
6
|
{{> components/teaser/group_teaser/group_teaser}}
|
|
File without changes
|
|
File without changes
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
{{#with this.brandNavigationItems}}
|
|
22
22
|
<ul class="flex pl-0.5 pr-3 md:px-0 flex-nowrap lg:mr-0">
|
|
23
23
|
{{#each this}}
|
|
24
|
-
{{> components/
|
|
24
|
+
{{> components/header/brand_navigation/brand_navigation_item }}
|
|
25
25
|
{{/each}}
|
|
26
26
|
</ul>
|
|
27
27
|
{{/with}}
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<div x-data="burger()" class="
|
|
1
|
+
<div x-data="burger()" class="flex items-center justify-center h-full fill-current sb-burger">
|
|
2
2
|
<nav>
|
|
3
3
|
<button {{!-- :class="$store.burgeropen ? 'text-blue-congress' : 'text-white'" --}}
|
|
4
4
|
class="relative w-10 h-10 text-white tablet:w-18 tablet:h-12 focus:outline-none bg-brand"
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
</button>
|
|
19
19
|
</nav>
|
|
20
20
|
</div>
|
|
21
|
+
|
|
21
22
|
<script>
|
|
22
23
|
var burger = () => {
|
|
23
24
|
return {
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<div class="sb-main-navigation" x-data="mainNavigationHandler()" x-init="init()">
|
|
2
|
+
|
|
3
|
+
<header class="relative z-101 {{#if this.hasOpenSubNavigation}}lg:h-header-lg-big{{else}}lg:h-header-lg-small{{/if}} md:h-header-md h-header-sm">
|
|
4
|
+
<div x-data
|
|
5
|
+
id="headerWrapper"
|
|
6
|
+
@resize.window="resetNav()"
|
|
7
|
+
:class="shouldBrandNavBeHidden() ? '-mt-10 lg:-mt-8' : '' "
|
|
8
|
+
class="fixed top-0 left-0 flex flex-wrap max-w-full transition-all duration-500 transform font-copy lg:justify-center lg:w-full ">
|
|
9
|
+
|
|
10
|
+
<div id="anchorNavWrapper"
|
|
11
|
+
class="hidden">
|
|
12
|
+
{{> components/header/anchor_navigation/anchor_navigation }}
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div id="brandNavWrapper"
|
|
16
|
+
class="relative flex items-center justify-center order-1 w-full bg-white z-101 print:hidden">
|
|
17
|
+
{{> components/header/brand_navigation/brand_navigation }}
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<div id="serviceNavWrapper"
|
|
21
|
+
:class="shouldServiceNavBeHidden() ? '-mt-40' : ''"
|
|
22
|
+
|
|
23
|
+
class="relative flex justify-center order-2 w-full transition-all duration-500 ease-in-out md:border-white lg:border-b bg-blue-congress z-102">
|
|
24
|
+
<div id="serviceNavMainContainer"
|
|
25
|
+
class="flex w-full h-10 lg:container md:h-12 lg:px-10 lg:h-16 z-101">
|
|
26
|
+
|
|
27
|
+
<span id="serviceNavHeadline" class="hidden print:hidden">Service Navigation</span>
|
|
28
|
+
|
|
29
|
+
<div id="serviceLogoWrapper"
|
|
30
|
+
class="flex items-center order-1 w-full pl-4 pr-2 tablet:pl-5 lg:items-end lg:pb-3 bg-blue-congress md:px-0 md:h-12 lg:h-16 md:w-1/2 md:max-w-1/2 lg:w-1/4 lg:max-w-1/4">
|
|
31
|
+
{{> components/header/service_logo }}
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<div id="serviceItemsWrapper"
|
|
35
|
+
class="flex items-center justify-end flex-initial order-2 inline-block w-full max-w-full align-top bg-blue-congress md:h-12 lg:h-16 lg:order-2 lg:w-3/4 lg:max-w-3/4 md:mt-0 md:w-1/2 md:max-w-1/2 md:order-2 md:border-0 print:hidden ">
|
|
36
|
+
{{> components/header/service_navigation/service_list }}
|
|
37
|
+
|
|
38
|
+
{{> components/header/search/quick_search_button }}
|
|
39
|
+
|
|
40
|
+
<div class="hidden lg:flex">
|
|
41
|
+
{{> components/header/search/quick_search_form }}
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<div id="burgerWrapper"
|
|
45
|
+
class="flex justify-end flex-none order-2 lg:order-4 md:order-4 lg:hidden ">
|
|
46
|
+
{{> components/header/burger }}
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<div id="sectionNavWrapper"
|
|
54
|
+
x-ref="sectionnavigation"
|
|
55
|
+
@toggle-sectionnav.window="toggleSectionNav"
|
|
56
|
+
:class="shouldSectionNavBeHidden() ? '-mt-40 md:-mt-40 lg:-mt-40' : ''"
|
|
57
|
+
class="flex justify-center order-3 w-full overflow-hidden duration-500 transition-max-height lg:transition-margin-top lg:duration-500 tablet:absolute tablet:top-22 tablet:w-half-screen tablet:ml-half-screen max-h-0 lg:overflow-visible md:mt-0 lg:flex lg:max-h-full lg:h-auto bg-blue-congress z-100 print:hidden"
|
|
58
|
+
>
|
|
59
|
+
{{> components/header/section_navigation/section_navigation }}
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div x-cloak :class="shouldServiceNavBeHidden() ? 'hidden -mt-40' : ''"
|
|
63
|
+
x-effect="$el.setAttribute('id', 'flyout-' + $store.searchID.current + '-2');$el.setAttribute('aria-expanded', $store.searchFieldOpen);$el.setAttribute('aria-hidden', !$store.searchFieldOpen);$el.setAttribute('aria-labelledby', 'flyout-' + $store.searchID.current + '-1')"
|
|
64
|
+
x-show="$store.searchFieldOpen"
|
|
65
|
+
class="sb-quick-search-flyout flex tablet:w-half-screen tablet:ml-half-screen justify-end order-4 w-full max-w-full p-2 px-5 py-3.5 bg-white drop-shadow-md md:mt-0 z-102 lg:hidden print:hidden"
|
|
66
|
+
@search-close.window="$store.searchFieldOpen = false"
|
|
67
|
+
@click.outside="$store.searchFieldOpen = false; $dispatch('search-mobile-click-outside'); dropped = false; toggleScrolling(!$store.serviceNavIsOpensearchFieldOpen && !$store.burgeropen)"
|
|
68
|
+
x-transition:enter="transition ease-out duration-200"
|
|
69
|
+
x-transition:enter-start="opacity-0 transform scale-y-90"
|
|
70
|
+
x-transition:enter-end="opacity-100 transform scale-y-100"
|
|
71
|
+
x-transition:leave="transition ease-in duration-100"
|
|
72
|
+
x-transition:leave-start="opacity-100 transform scale-y-100"
|
|
73
|
+
x-transition:leave-end="opacity-0 transform scale-y-90">
|
|
74
|
+
|
|
75
|
+
{{> components/header/search/quick_search_form }}
|
|
76
|
+
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
</header>
|
|
82
|
+
<div x-ref="myOverlay">
|
|
83
|
+
<div x-cloak x-data="overlayHandler()" @click.debounce="overlayWasClicked()" x-show="shouldOverlayBeShown()" class="fixed top-0 left-0 w-screen h-screen bg-gray-800 z-100 lg:hidden opacity-70"></div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
//Main Alpine Init Listener
|
|
2
|
+
document.addEventListener('alpine:init', () => {
|
|
3
|
+
// Alpine.stores for global variables
|
|
4
|
+
Alpine.store('clientHeight', document.documentElement.clientHeight || document.body.clientHeight)
|
|
5
|
+
Alpine.store('clientWidth', document.documentElement.clientWidth || document.body.clientWidth)
|
|
6
|
+
Alpine.store('burgeropen', false);
|
|
7
|
+
Alpine.store('searchFieldOpen', false);
|
|
8
|
+
Alpine.store('serviceNavIsOpen', false);
|
|
9
|
+
Alpine.store('searchID', {
|
|
10
|
+
current: '{{nextRandom}}'
|
|
11
|
+
});
|
|
12
|
+
Alpine.store('serviceID', {
|
|
13
|
+
open: false,
|
|
14
|
+
current: '0'
|
|
15
|
+
});
|
|
16
|
+
Alpine.store('navIsVisible', true);
|
|
17
|
+
|
|
18
|
+
// context for the main header element
|
|
19
|
+
Alpine.data('mainNavigationHandler', () =>({
|
|
20
|
+
|
|
21
|
+
debounce (callback, wait) {
|
|
22
|
+
let timeoutId = null;
|
|
23
|
+
return (...args) => {
|
|
24
|
+
window.clearTimeout(timeoutId);
|
|
25
|
+
timeoutId = window.setTimeout(() => {
|
|
26
|
+
callback.apply(null, args);
|
|
27
|
+
}, wait);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
},
|
|
31
|
+
init(){
|
|
32
|
+
let lastScrollTop = 0
|
|
33
|
+
let height = top.innerHeight
|
|
34
|
+
|
|
35
|
+
window.addEventListener('scroll', this.debounce( () => {
|
|
36
|
+
let winScroll = document.body.scrollTop || document.documentElement.scrollTop
|
|
37
|
+
winScroll > lastScrollTop ? this.scrollingDown = true : this.scrollingDown = false
|
|
38
|
+
//let height = document.documentElement.scrollHeight - document.documentElement.clientHeight
|
|
39
|
+
this.percent = Math.round((winScroll / height) * 100)
|
|
40
|
+
lastScrollTop = winScroll
|
|
41
|
+
//console.log('winscroll: '+winScroll+' height: '+height + ' percent: '+ this.percent)
|
|
42
|
+
this.$store.navIsVisible = !this.isNavHidden()
|
|
43
|
+
//console.log(this.$store.navIsVisible);
|
|
44
|
+
},50))
|
|
45
|
+
},
|
|
46
|
+
percent: 0,
|
|
47
|
+
scrollingDown: true,
|
|
48
|
+
isNavHidden() {
|
|
49
|
+
if(this.$screen('lg')) {
|
|
50
|
+
return this.shouldSectionNavBeHidden()
|
|
51
|
+
} else {
|
|
52
|
+
return this.shouldServiceNavBeHidden()
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
shouldBrandNavBeHidden() {
|
|
56
|
+
return this.percent > 0
|
|
57
|
+
},
|
|
58
|
+
shouldSectionNavBeHidden() {
|
|
59
|
+
return this.percent > 50 && this.scrollingDown && this.$store.burgeropen == false && this.$screen('lg')
|
|
60
|
+
},
|
|
61
|
+
shouldServiceNavBeHidden() {
|
|
62
|
+
return (this.percent > 90 && !this.$screen('lg') && this.scrollingDown && this.$store.burgeropen == false)
|
|
63
|
+
},
|
|
64
|
+
shouldServiceIconsBeHidden() {
|
|
65
|
+
return (this.percent > 50 && !this.$screen('md') && this.$store.burgeropen == false && this.$store.serviceNavIsOpen == false && this.scrollingDown == true) || (this.percent > 50 && !this.$screen('md') && this.$store.burgeropen == false && this.$store.serviceNavIsOpen == false && this.scrollingDown == false)
|
|
66
|
+
},
|
|
67
|
+
shouldFlyoutBeHidden() {
|
|
68
|
+
return (this.percent > 50 && this.scrollingDown && this.$screen('lg') )
|
|
69
|
+
},
|
|
70
|
+
resetNav() {
|
|
71
|
+
if(window.innerWidth > 1023) {
|
|
72
|
+
this.$refs.sectionnavigation.setAttribute("style","")
|
|
73
|
+
} else {
|
|
74
|
+
// hidden needs to be set here to avoid flickering of the sectionNav on viewport change, gets removed in timeout
|
|
75
|
+
// this.$refs.sectionnavigation.classList.add('hidden')
|
|
76
|
+
// this.$refs.sectionnavigation.style.maxHeight="0px"
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
let nowClientHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
|
80
|
+
let nowClientWidth = document.documentElement.clientWidth || document.body.clientWidth;
|
|
81
|
+
let nextNowClientHeight = this.$store.clientHeight;
|
|
82
|
+
if (nextNowClientHeight >= nowClientHeight && this.$store.clientWidth == nowClientWidth) {
|
|
83
|
+
// Event handling of keyboard pop-up
|
|
84
|
+
nextNowClientHeight = nowClientHeight
|
|
85
|
+
this.$store.clientWidth = nowClientWidth
|
|
86
|
+
}
|
|
87
|
+
else{
|
|
88
|
+
// timeout is used to dispatch events after the resize is done
|
|
89
|
+
let timeout
|
|
90
|
+
clearTimeout(timeout)
|
|
91
|
+
timeout = setTimeout(() => {
|
|
92
|
+
this.$refs.sectionnavigation.classList.remove('hidden')
|
|
93
|
+
this.$store.burgeropen == true ? this.$dispatch('burger-close') :null
|
|
94
|
+
this.$store.searchFieldOpen === true ? this.$dispatch('search-mobile-click-outside') :null
|
|
95
|
+
this.$store.searchFieldOpen === true ? this.$dispatch('search-close') :null
|
|
96
|
+
this.$store.serviceNavIsOpen === true ? this.$dispatch('close-servicemenu') :null
|
|
97
|
+
this.toggleScrolling(true)
|
|
98
|
+
}, 250)
|
|
99
|
+
// Event handling of keyboard pop-up
|
|
100
|
+
nextNowClientHeight = nowClientHeight
|
|
101
|
+
this.$store.clientWidth = nowClientWidth
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
toggleSectionNav() {
|
|
105
|
+
//false = sectionNav schließt ( mobile/tablet? --> maxHeight = 0 /// desktop? just clear maxHeight attribute )
|
|
106
|
+
//true = sectionNav öffnet (maxheight = scrollheight)
|
|
107
|
+
console.log('toggleSectionNav, Event: ' + this.$event.detail )
|
|
108
|
+
if(this.$event.detail === false) {
|
|
109
|
+
if (window.innerWidth < 1024) {
|
|
110
|
+
this.$refs.sectionnavigation.style.maxHeight='0px'
|
|
111
|
+
} else {
|
|
112
|
+
this.$refs.sectionnavigation.style.maxHeight = ''
|
|
113
|
+
}
|
|
114
|
+
} else {
|
|
115
|
+
let winheightcorr = parseInt(window.innerHeight) - this.$refs.sectionnavigation.offsetTop
|
|
116
|
+
let navheight = parseInt(this.$refs.sectionnavigation.scrollHeight)
|
|
117
|
+
let brandNavHeight = this.percent > 0 ? 40 : 0
|
|
118
|
+
|
|
119
|
+
if(navheight > winheightcorr){
|
|
120
|
+
this.$refs.sectionnavigation.style.overflowY = 'scroll'
|
|
121
|
+
this.$refs.sectionnavigation.style.maxHeight = winheightcorr + brandNavHeight +'px'
|
|
122
|
+
|
|
123
|
+
} else {
|
|
124
|
+
this.$refs.sectionnavigation.style.overflowY = 'hidden'
|
|
125
|
+
this.$refs.sectionnavigation.style.maxHeight = this.$el.scrollHeight + 'px'
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
disableScrolling() {
|
|
130
|
+
document.body.classList.add('overflow-hidden','h-full','w-full')
|
|
131
|
+
this.$refs.myOverlay.ontouchmove = (e) => e.preventDefault();
|
|
132
|
+
console.log("disableScrolling")
|
|
133
|
+
},
|
|
134
|
+
enableScrolling() {
|
|
135
|
+
document.body.classList.remove('overflow-hidden','h-full','w-full')
|
|
136
|
+
this.$refs.myOverlay.ontouchmove = (e) => true;
|
|
137
|
+
console.log("enableScrolling")
|
|
138
|
+
},
|
|
139
|
+
toggleScrolling(mode){
|
|
140
|
+
if(this.$screen(0) && !this.$screen('lg')){
|
|
141
|
+
mode == false ? this.disableScrolling() : this.enableScrolling()
|
|
142
|
+
}
|
|
143
|
+
if(this.$screen('lg') && mode == true){
|
|
144
|
+
this.enableScrolling()
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
}))
|
|
149
|
+
|
|
150
|
+
// context for the overlay
|
|
151
|
+
Alpine.data('overlayHandler', () => ({
|
|
152
|
+
shouldOverlayBeShown() {
|
|
153
|
+
return (!this.$screen('lg') && ( this.$store.burgeropen == true || this.$store.serviceNavIsOpen == true || this.$store.searchFieldOpen == true ))
|
|
154
|
+
},
|
|
155
|
+
overlayWasClicked() {
|
|
156
|
+
this.$store.serviceNavIsOpen ? this.$store.serviceNavIsOpen = false : null
|
|
157
|
+
this.$dispatch('burger-close')
|
|
158
|
+
this.$dispatch('close-servicemenu')
|
|
159
|
+
// this.$dispatch('toggleScrolling', true )
|
|
160
|
+
this.toggleScrolling(true)
|
|
161
|
+
}
|
|
162
|
+
}))
|
|
163
|
+
|
|
164
|
+
// context for all dropdowns
|
|
165
|
+
Alpine.data('dropdown', () => ({
|
|
166
|
+
dropped: false,
|
|
167
|
+
toggle() {
|
|
168
|
+
this.dropped = ! this.dropped;
|
|
169
|
+
},
|
|
170
|
+
toggleServiceNav(){
|
|
171
|
+
this.dropped = ! this.dropped;
|
|
172
|
+
this.$store.searchFieldOpen = false;
|
|
173
|
+
|
|
174
|
+
this.$el.id != this.$store.serviceID.current ? this.$store.serviceNavIsOpen = true : this.$el.id == this.$store.serviceID.current ? this.$store.serviceNavIsOpen = !this.$store.serviceNavIsOpen : null;
|
|
175
|
+
|
|
176
|
+
this.$store.burgeropen == true ? this.$dispatch('burger-close') : null
|
|
177
|
+
|
|
178
|
+
console.log('currentID: '+ this.$store.serviceID.current)
|
|
179
|
+
console.log('target-id: '+this.$event.target.id)
|
|
180
|
+
console.log('element-id: '+this.$el.id)
|
|
181
|
+
console.log('serviceNav is open:'+ this.$store.serviceNavIsOpen)
|
|
182
|
+
|
|
183
|
+
this.$store.serviceID.current = this.$el.id
|
|
184
|
+
|
|
185
|
+
this.toggleScrolling(!this.$store.serviceNavIsOpen)
|
|
186
|
+
|
|
187
|
+
let myFlyout = document.querySelector('#flyout-'+this.$el.id)
|
|
188
|
+
let brandNavHeight = this.percent > 0 ? 40 : 0
|
|
189
|
+
|
|
190
|
+
if (this.$store.serviceNavIsOpen == true && this.dropped == true) {
|
|
191
|
+
window.setTimeout(function(){
|
|
192
|
+
if (myFlyout.scrollHeight > window.innerHeight-myFlyout.offsetTop) {
|
|
193
|
+
myFlyout.style.height = 'auto'
|
|
194
|
+
window.innerWidth < 768 ? myFlyout.style.maxHeight = window.innerHeight-myFlyout.offsetTop - 80 + brandNavHeight +'px' : myFlyout.style.maxHeight = window.innerHeight-myFlyout.offsetTop - 40 + brandNavHeight +'px'
|
|
195
|
+
myFlyout.style.overflowY = 'scroll'
|
|
196
|
+
} else {
|
|
197
|
+
myFlyout.style.maxHeight = ''
|
|
198
|
+
//myFlyout.style.overflowY = 'hidden'
|
|
199
|
+
}
|
|
200
|
+
},150)
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}))
|
|
204
|
+
|
|
205
|
+
// There are several Flyouts sharing the same functionality and context, so put the data in an Alpine.data to make it reusable
|
|
206
|
+
Alpine.data('flyoutHandler', () => ({
|
|
207
|
+
init() {
|
|
208
|
+
//Initial: x-collapse only on mobile/tablet
|
|
209
|
+
if(window.innerWidth < 1024) {
|
|
210
|
+
this.$el.setAttribute("x-collapse","")
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
sectionNavFlyoutWatcher() {
|
|
214
|
+
//Adds scrollheight of the flyout to sectionNav container to make sure all following items stay visible
|
|
215
|
+
this.$watch('dropped', value => {
|
|
216
|
+
let a = this.$refs.sectionnavigation.scrollHeight + this.$el.scrollHeight;
|
|
217
|
+
let brandNavHeight = this.percent > 0 ? 40 : 0
|
|
218
|
+
if(window.innerWidth < 1024) {
|
|
219
|
+
if(value == true ) {
|
|
220
|
+
|
|
221
|
+
if (a < window.innerHeight - this.$refs.sectionnavigation.offsetTop) {
|
|
222
|
+
this.$refs.sectionnavigation.style.maxHeight = a +'px'
|
|
223
|
+
this.$refs.sectionnavigation.style.overflowY = 'hidden'
|
|
224
|
+
} else {
|
|
225
|
+
this.$refs.sectionnavigation.style.maxHeight = window.innerHeight - this.$refs.sectionnavigation.offsetTop + brandNavHeight +'px'
|
|
226
|
+
this.$refs.sectionnavigation.style.overflowY = 'scroll'
|
|
227
|
+
}
|
|
228
|
+
} else {
|
|
229
|
+
if (a < window.innerHeight - this.$refs.sectionnavigation.offsetTop) {
|
|
230
|
+
this.$refs.sectionnavigation.style.overflowY = 'hidden'
|
|
231
|
+
} else {
|
|
232
|
+
this.$refs.sectionnavigation.style.overflowY = 'scroll'
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
})
|
|
237
|
+
},
|
|
238
|
+
setFlyoutAnimationStyle() {
|
|
239
|
+
//sets/cleansup the x-collapse attributes depending on window.innerWidth, gets fired @resize.window in NavigationFlyout.hbs
|
|
240
|
+
if(window.innerWidth > 1023) {
|
|
241
|
+
if(this.$el.hasAttribute("x-collapse.duration.500ms")) {
|
|
242
|
+
this.$el.removeAttribute("x-collapse.duration.500ms")
|
|
243
|
+
delete this.$el._x_transition;
|
|
244
|
+
this.$el.style.removeProperty('overflow');
|
|
245
|
+
this.$el.style.removeProperty('height');
|
|
246
|
+
if (! this.$el._x_isShown) this.$el.style.display = 'none'
|
|
247
|
+
if(this.$el.hasAttribute("hidden")) this.$el.removeAttribute("hidden")
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
} else {
|
|
251
|
+
if(!this.$el.hasAttribute("x-collapse.duration.500ms")) this.$el.setAttribute("x-collapse.duration.500ms","")
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}))
|
|
255
|
+
})
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
<div class="{{#if this.showAsFlyout}}lg:flex lg:flex-row -columnCount--{{this.columnCount}} lg:divide-x lg:divide-gray-200 {{else}} {{#if ../this.selected}} w-full lg:px-10 lg:container {{/if}}{{/if}}">
|
|
45
45
|
{{#if this.showAsFlyout}}
|
|
46
46
|
{{#each this.columns}}
|
|
47
|
-
{{> components/
|
|
47
|
+
{{> components/header/navigation_flyout/navigation_flyout_column count=../this.columnCount navtype=../../_navigationType _parent=../../_parent _flyout=true~}}
|
|
48
48
|
{{/each}}
|
|
49
49
|
{{else}}
|
|
50
50
|
{{#with this.items}}
|
|
51
|
-
{{> components/
|
|
51
|
+
{{> components/header/navigation_flyout/navigation_flyout_column selected=../../this.selected navtype=../../_navigationType _parent=../../_parent _flyout=false ~}}
|
|
52
52
|
{{/with}}
|
|
53
53
|
{{/if}}
|
|
54
54
|
</div>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
{{~#each this ~}}
|
|
4
4
|
{{~#if this.title~}}
|
|
5
|
-
{{> components/
|
|
5
|
+
{{> components/header/navigation_flyout/navigation_flyout_item _parentselected=../selected _fromNav=../navtype _flyout=../_flyout _parent=../_parent ~}}
|
|
6
6
|
{{~/if~}}
|
|
7
7
|
{{~/each~}}
|
|
8
8
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div
|
|
2
2
|
id="sectionNav"
|
|
3
|
-
class="
|
|
3
|
+
class="w-full px-0 mt-10 sb-section-navigation md:mt-0 lg:px-10 lg:container bg-blue-congress"
|
|
4
4
|
x-effect="$el.setAttribute('aria-expanded', $store.burgeropen || $screen('lg')); $el.setAttribute('aria-hidden', ! ($store.burgeropen || $screen('lg')))"
|
|
5
5
|
>
|
|
6
6
|
<div class="flex content-start mb-0">
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<ul class="flex flex-col items-center w-full text-left text-white list-none lg:flex-row lg:h-auto lg:mt-1">
|
|
11
11
|
{{#each this}}
|
|
12
12
|
{{#if (isStorybook)}}
|
|
13
|
-
{{> components/
|
|
13
|
+
{{> components/header/section_navigation/section_navigation_item }}
|
|
14
14
|
{{else}}
|
|
15
15
|
{{{this}}}
|
|
16
16
|
{{/if}}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@click.outside="dropped = false"
|
|
4
4
|
@close-servicemenu.window="dropped = false"
|
|
5
5
|
:class="dropped ? 'border-b-0 lg:bg-white lg:text-blue-congress h-auto' : 'h-10 lg:hover:underline'"
|
|
6
|
-
class="
|
|
6
|
+
class="flex flex-wrap justify-start w-full text-white list-none border-b border-white sb-section-navigation-item first:lg:-ml-4 md:pl-0 lg:first:pl-0 first:border-t lg:first:border-t-0 first:font-normal last:border-b-0 lg:border-0 lg:w-auto bg-blue-congress lg:rounded-t">
|
|
7
7
|
{{#if this.isCluster ~}}
|
|
8
8
|
{{!-- Gilt z.B. für REGIONEN: --}}
|
|
9
9
|
<button id="button-{{nextRandom}}-1"
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
|
|
95
95
|
{{/if}}
|
|
96
96
|
|
|
97
|
-
{{> components/
|
|
97
|
+
{{> components/header/navigation_flyout/navigation_flyout _isSectionNav=true _navigationType="RubrikNavigation" _parent=this.text }}
|
|
98
98
|
|
|
99
99
|
</li>
|
|
100
100
|
{{/each}}
|
|
File without changes
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
{{#with this.serviceNavigationSSILinks}}
|
|
9
9
|
<ul class="flex justify-around w-full h-full -itemCount-{{ count }} lg:w-auto lg:justify-end lg:pt-1">
|
|
10
10
|
{{#each this}}
|
|
11
|
-
{{> components/base/loadSSI templatePath='components/
|
|
11
|
+
{{> components/base/loadSSI templatePath='components/header/service_navigation/service_navigation_item' }}
|
|
12
12
|
{{/each}}
|
|
13
13
|
</ul>
|
|
14
14
|
{{/with}}
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
</div>
|
|
51
51
|
</div>
|
|
52
52
|
{{#if this.subNavigation}}
|
|
53
|
-
{{> components/
|
|
53
|
+
{{> components/header/navigation_flyout/navigation_flyout _isSectionNav=false _navigationType="ServiceNavigation" _parent=this.text }}
|
|
54
54
|
</button>
|
|
55
55
|
{{else}}
|
|
56
56
|
</a>
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"repository": "https://github.com/szuelch/hr-design-system-handlebars",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.45.0",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
12
|
"storybook": "start-storybook -p 6006 public",
|