hr-design-system-handlebars 0.55.0 → 0.55.3
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/.vscode/settings.json +2 -0
- package/CHANGELOG.md +36 -0
- package/dist/assets/index.css +28 -21
- package/dist/views/components/content_nav/content_nav.hbs +8 -7
- package/dist/views/components/content_nav/content_nav_item.hbs +2 -3
- package/dist/views/components/content_nav/content_nav_list.hbs +3 -2
- package/{src/stories/views/components/base/menu → dist/views/components/content_nav}/dropdown.hbs +7 -48
- package/dist/views/components/site_header/header_alpine.js +37 -0
- package/dist/views/components/teaser/content_nav/teaser_content_nav.hbs +1 -1
- package/package.json +1 -1
- package/src/assets/fixtures/teaser/{teaser_content_nav_mixed_25.json → teaser_content_nav_mixed_autosuggest.json} +3 -3
- package/src/stories/views/components/content_nav/content_nav.hbs +8 -7
- package/src/stories/views/components/content_nav/content_nav_item.hbs +2 -3
- package/src/stories/views/components/content_nav/content_nav_list.hbs +3 -2
- package/{dist/views/components/base/menu → src/stories/views/components/content_nav}/dropdown.hbs +7 -48
- package/src/stories/views/components/site_header/header_alpine.js +37 -0
- package/src/stories/views/components/teaser/content_nav/teaser_content_nav.hbs +1 -1
- package/src/stories/views/components/teaser/content_nav/teaser_content_nav.stories.mdx +31 -68
- package/src/stories/views/components/teaser/fixtures/{teaser_content_nav_dropdown_50.json → teaser_content_nav_mixed_autosuggest.json} +1 -1
- package/tailwind.config.js +1 -1
- package/dist/assets/js/views/components/base/menu/toggleClass.feature.js +0 -229
- package/dist/views/components/base/menu/o-dropdown.hbs +0 -43
- package/dist/views/components/base/menu/toggleClass.feature.js +0 -229
- package/src/assets/fixtures/teaser/teaser_content_nav_dropdown_50.json +0 -188
- package/src/assets/fixtures/teaser/teaser_content_nav_dropdown_autosuggest_50.json +0 -188
- package/src/assets/fixtures/teaser/teaser_content_nav_list_25.json +0 -182
- package/src/assets/fixtures/teaser/teaser_content_nav_list_33.json +0 -182
- package/src/assets/fixtures/teaser/teaser_content_nav_list_50.json +0 -182
- package/src/assets/fixtures/teaser/teaser_content_nav_list_66.json +0 -182
- package/src/assets/fixtures/teaser/teaser_content_nav_mixed_33.json +0 -185
- package/src/assets/fixtures/teaser/teaser_content_nav_mixed_50.json +0 -185
- package/src/assets/fixtures/teaser/teaser_content_nav_mixed_66.json +0 -185
- package/src/stories/views/components/base/menu/o-dropdown.hbs +0 -43
- package/src/stories/views/components/base/menu/toggleClass.feature.js +0 -229
- package/src/stories/views/components/teaser/fixtures/teaser_content_nav_dropdown_autosuggest100.json +0 -1
- package/src/stories/views/components/teaser/fixtures/teaser_content_nav_dropdown_autosuggest_50.json +0 -1
- package/src/stories/views/components/teaser/fixtures/teaser_content_nav_list_25.json +0 -1
- package/src/stories/views/components/teaser/fixtures/teaser_content_nav_list_33.json +0 -1
- package/src/stories/views/components/teaser/fixtures/teaser_content_nav_list_50.json +0 -1
- package/src/stories/views/components/teaser/fixtures/teaser_content_nav_list_66.json +0 -1
- package/src/stories/views/components/teaser/fixtures/teaser_content_nav_mixed_25.json +0 -1
- package/src/stories/views/components/teaser/fixtures/teaser_content_nav_mixed_33.json +0 -1
- package/src/stories/views/components/teaser/fixtures/teaser_content_nav_mixed_50.json +0 -1
- package/src/stories/views/components/teaser/fixtures/teaser_content_nav_mixed_66.json +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,39 @@
|
|
|
1
|
+
# v0.55.3 (Fri Aug 19 2022)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- Content nav part4 [#304](https://github.com/mumprod/hr-design-system-handlebars/pull/304) ([@StefanVesper](https://github.com/StefanVesper))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- SonicSoulSurfer ([@StefanVesper](https://github.com/StefanVesper))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# v0.55.2 (Fri Aug 19 2022)
|
|
14
|
+
|
|
15
|
+
#### 🐛 Bug Fix
|
|
16
|
+
|
|
17
|
+
- moved script to header_alpine.js [#303](https://github.com/mumprod/hr-design-system-handlebars/pull/303) ([@StefanVesper](https://github.com/StefanVesper))
|
|
18
|
+
|
|
19
|
+
#### Authors: 1
|
|
20
|
+
|
|
21
|
+
- SonicSoulSurfer ([@StefanVesper](https://github.com/StefanVesper))
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# v0.55.1 (Fri Aug 19 2022)
|
|
26
|
+
|
|
27
|
+
#### 🐛 Bug Fix
|
|
28
|
+
|
|
29
|
+
- bugfix [#302](https://github.com/mumprod/hr-design-system-handlebars/pull/302) ([@StefanVesper](https://github.com/StefanVesper))
|
|
30
|
+
|
|
31
|
+
#### Authors: 1
|
|
32
|
+
|
|
33
|
+
- SonicSoulSurfer ([@StefanVesper](https://github.com/StefanVesper))
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
1
37
|
# v0.55.0 (Fri Aug 19 2022)
|
|
2
38
|
|
|
3
39
|
#### 🚀 Enhancement
|
package/dist/assets/index.css
CHANGED
|
@@ -902,6 +902,9 @@ video {
|
|
|
902
902
|
.w-4 {
|
|
903
903
|
width: 1rem;
|
|
904
904
|
}
|
|
905
|
+
.w-auto {
|
|
906
|
+
width: auto;
|
|
907
|
+
}
|
|
905
908
|
.w-6 {
|
|
906
909
|
width: 1.5rem;
|
|
907
910
|
}
|
|
@@ -914,9 +917,6 @@ video {
|
|
|
914
917
|
.w-40 {
|
|
915
918
|
width: 10rem;
|
|
916
919
|
}
|
|
917
|
-
.w-auto {
|
|
918
|
-
width: auto;
|
|
919
|
-
}
|
|
920
920
|
.w-3\.5 {
|
|
921
921
|
width: 0.875rem;
|
|
922
922
|
}
|
|
@@ -1218,15 +1218,15 @@ video {
|
|
|
1218
1218
|
.border-b {
|
|
1219
1219
|
border-bottom-width: 1px;
|
|
1220
1220
|
}
|
|
1221
|
+
.border-l {
|
|
1222
|
+
border-left-width: 1px;
|
|
1223
|
+
}
|
|
1221
1224
|
.border-r {
|
|
1222
1225
|
border-right-width: 1px;
|
|
1223
1226
|
}
|
|
1224
1227
|
.border-l-2 {
|
|
1225
1228
|
border-left-width: 2px;
|
|
1226
1229
|
}
|
|
1227
|
-
.border-l {
|
|
1228
|
-
border-left-width: 1px;
|
|
1229
|
-
}
|
|
1230
1230
|
.border-b-0 {
|
|
1231
1231
|
border-bottom-width: 0px;
|
|
1232
1232
|
}
|
|
@@ -1442,6 +1442,14 @@ video {
|
|
|
1442
1442
|
padding-left: 0.75rem;
|
|
1443
1443
|
padding-right: 0.75rem;
|
|
1444
1444
|
}
|
|
1445
|
+
.px-2 {
|
|
1446
|
+
padding-left: 0.5rem;
|
|
1447
|
+
padding-right: 0.5rem;
|
|
1448
|
+
}
|
|
1449
|
+
.py-1 {
|
|
1450
|
+
padding-top: 0.25rem;
|
|
1451
|
+
padding-bottom: 0.25rem;
|
|
1452
|
+
}
|
|
1445
1453
|
.py-6 {
|
|
1446
1454
|
padding-top: 1.5rem;
|
|
1447
1455
|
padding-bottom: 1.5rem;
|
|
@@ -1466,18 +1474,10 @@ video {
|
|
|
1466
1474
|
padding-left: 1.25rem;
|
|
1467
1475
|
padding-right: 1.25rem;
|
|
1468
1476
|
}
|
|
1469
|
-
.px-2 {
|
|
1470
|
-
padding-left: 0.5rem;
|
|
1471
|
-
padding-right: 0.5rem;
|
|
1472
|
-
}
|
|
1473
1477
|
.py-4 {
|
|
1474
1478
|
padding-top: 1rem;
|
|
1475
1479
|
padding-bottom: 1rem;
|
|
1476
1480
|
}
|
|
1477
|
-
.py-1 {
|
|
1478
|
-
padding-top: 0.25rem;
|
|
1479
|
-
padding-bottom: 0.25rem;
|
|
1480
|
-
}
|
|
1481
1481
|
.py-1\.5 {
|
|
1482
1482
|
padding-top: 0.375rem;
|
|
1483
1483
|
padding-bottom: 0.375rem;
|
|
@@ -1867,7 +1867,7 @@ video {
|
|
|
1867
1867
|
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
|
|
1868
1868
|
}
|
|
1869
1869
|
.counter-reset {
|
|
1870
|
-
counter-reset:
|
|
1870
|
+
counter-reset: cnt1660939134937;
|
|
1871
1871
|
}
|
|
1872
1872
|
.placeholder-text-xs::-webkit-input-placeholder {
|
|
1873
1873
|
font-size: 0.75rem;
|
|
@@ -2250,7 +2250,7 @@ video {
|
|
|
2250
2250
|
--tw-ring-color: rgba(255, 255, 255, 0.5);
|
|
2251
2251
|
}
|
|
2252
2252
|
.-ordered {
|
|
2253
|
-
counter-increment:
|
|
2253
|
+
counter-increment: cnt1660939134937 1;
|
|
2254
2254
|
}
|
|
2255
2255
|
.-ordered::before {
|
|
2256
2256
|
position: absolute;
|
|
@@ -2267,7 +2267,7 @@ video {
|
|
|
2267
2267
|
letter-spacing: .0125em;
|
|
2268
2268
|
--tw-text-opacity: 1;
|
|
2269
2269
|
color: rgba(0, 0, 0, var(--tw-text-opacity));
|
|
2270
|
-
content: counter(
|
|
2270
|
+
content: counter(cnt1660939134937);
|
|
2271
2271
|
}
|
|
2272
2272
|
/*! purgecss start ignore */
|
|
2273
2273
|
:root,
|
|
@@ -2644,6 +2644,9 @@ video {
|
|
|
2644
2644
|
.first\:font-bold:first-child {
|
|
2645
2645
|
font-weight: 700;
|
|
2646
2646
|
}
|
|
2647
|
+
.last\:mb-0:last-child {
|
|
2648
|
+
margin-bottom: 0px;
|
|
2649
|
+
}
|
|
2647
2650
|
.last\:border-b-0:last-child {
|
|
2648
2651
|
border-bottom-width: 0px;
|
|
2649
2652
|
}
|
|
@@ -2861,6 +2864,10 @@ video {
|
|
|
2861
2864
|
display: none;
|
|
2862
2865
|
}
|
|
2863
2866
|
|
|
2867
|
+
.md\:h-auto {
|
|
2868
|
+
height: auto;
|
|
2869
|
+
}
|
|
2870
|
+
|
|
2864
2871
|
.md\:h-header-md {
|
|
2865
2872
|
height: 5.5625rem;
|
|
2866
2873
|
}
|
|
@@ -2873,10 +2880,6 @@ video {
|
|
|
2873
2880
|
height: 1.75rem;
|
|
2874
2881
|
}
|
|
2875
2882
|
|
|
2876
|
-
.md\:h-auto {
|
|
2877
|
-
height: auto;
|
|
2878
|
-
}
|
|
2879
|
-
|
|
2880
2883
|
.md\:h-full {
|
|
2881
2884
|
height: 100%;
|
|
2882
2885
|
}
|
|
@@ -3151,6 +3154,10 @@ video {
|
|
|
3151
3154
|
}
|
|
3152
3155
|
}
|
|
3153
3156
|
|
|
3157
|
+
.md\:last\:mb-2:last-child {
|
|
3158
|
+
margin-bottom: 0.5rem;
|
|
3159
|
+
}
|
|
3160
|
+
|
|
3154
3161
|
.md\:first-of-type\:pt-0:first-of-type {
|
|
3155
3162
|
padding-top: 0px;
|
|
3156
3163
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
{{#with this.contentNav}}
|
|
1
|
+
{{#with this.contentNav}}
|
|
2
2
|
{{#if this.isList}}
|
|
3
3
|
<nav class="c-content-nav {{../_modifier}} ">
|
|
4
4
|
{{> components/content_nav/content_nav_list _teasersize=../_teasersize}}
|
|
5
5
|
</nav>
|
|
6
6
|
{{else}}
|
|
7
|
-
{{#>components/
|
|
7
|
+
{{#>components/content_nav/dropdown
|
|
8
8
|
_componentClass="c-content-nav"
|
|
9
9
|
_teasersize=../_teasersize
|
|
10
10
|
_iconOpen="arrow-down"
|
|
@@ -14,18 +14,19 @@
|
|
|
14
14
|
}}
|
|
15
15
|
<div x-on:click.outside ="open = false;" class="flex flex-wrap {{#if this.isAutosuggest}} autoSuggest js-load{{/if}}"
|
|
16
16
|
{{#if this.isAutosuggest}}
|
|
17
|
-
data-hr-auto-suggest='{"filterGroupsSelector":".c-content-nav__group", "filterElementSelector":".c-content-nav__item", "filterTextSelector":".js-title", "inputElementSelector":".js-autosuggest-input", "matchedClass":"", "unmatchedClass":"hidden"}'
|
|
18
|
-
|
|
17
|
+
data-hr-auto-suggest='{"filterGroupsSelector":".c-content-nav__group", "filterElementSelector":".c-content-nav__item", "filterTextSelector":".js-title", "inputElementSelector":".js-autosuggest-input", "matchedClass":"", "unmatchedClass":"hidden"}'
|
|
18
|
+
{{/if}}
|
|
19
|
+
>
|
|
20
|
+
{{#if this.isAutosuggest}}
|
|
19
21
|
<div class="flex w-full h-10 my-2 c-content-nav__autosuggest border-blue-congress align-center">
|
|
20
22
|
<input x-ref="autosuggestInput" class="w-full pl-4 focus:outline-none js-autosuggest-input" type="text"
|
|
21
23
|
placeholder="Eintrag filtern"/>
|
|
22
24
|
</div>
|
|
23
25
|
{{/if}}
|
|
24
|
-
|
|
25
26
|
{{> components/content_nav/content_nav_list _teasersize=_teasersize}}
|
|
26
27
|
|
|
27
28
|
</div>
|
|
28
|
-
{{/components/
|
|
29
|
+
{{/components/content_nav/dropdown}}
|
|
29
30
|
|
|
30
|
-
{{/if}}
|
|
31
|
+
{{/if}}
|
|
31
32
|
{{/with}}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
<li :class="{{_isdropdown}} ? '!w-full md:!w-full mb-2 md:mb-0 md:!mr-0 border-l-0 border-r-0 border-t-0 border-b last:border-b-0 !rounded-none '
|
|
2
2
|
: {{_ismixed}} && {{_teasersize}} >= 66 ? '!w-full md:!w-fit md:!mr-2 !mb-0 md:!mb-2 border-l-0 border-r-0 border-t-0 border-b last:border-b-0 rounded-none md:!border md:!rounded'
|
|
3
3
|
: {{_ismixed}} && {{_teasersize}} <= 50 ? '!w-full border-b !mb-0 last:border-b-0'
|
|
4
|
-
: {{_islist}} ? 'border rounded mb-2 '
|
|
4
|
+
: {{_islist}} ? 'border rounded mb-2 last:mb-0 md:last:mb-2'
|
|
5
5
|
: '' "
|
|
6
|
-
|
|
7
6
|
class="{{inline-switch _teasersize '["100","66","50","33","25"]' '["w-full md:w-fit md:mr-2","w-fit mb-2 md:mr-2","w-full mb-2","w-full mb-2","w-full mb-2"]'}} overflow-hidden text-base font-copy list-none border-blue-congress fill-congress hover:fill-white text-blue-congress hover:text-white hover:underline {{#if this.isSelected}} -current{{/if}} c-content-nav__item">
|
|
8
7
|
{{#>components/base/link.hbs
|
|
9
8
|
_doNavigationTracking="true"
|
|
10
9
|
_clickLabelType="Contentnavigation"
|
|
11
10
|
_clickLabelPrefix1=this.title
|
|
12
|
-
_css="flex items-center py-2 px-4
|
|
11
|
+
_css="flex items-center py-2 px-4 h-8 bg-white hover:bg-blue-congress rounded-sm whitespace-nowrap overflow-hidden"
|
|
13
12
|
_isSelected=this.isSelected
|
|
14
13
|
_selectedCssClass="is-selected"
|
|
15
14
|
}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<ul
|
|
2
|
-
|
|
1
|
+
<ul {{!-- x-init="addDependentCssToUl({{this.isMixed}},{{this.isDropdown}},{{_teasersize}})" --}}
|
|
2
|
+
:class="{{this.isMixed}} && {{_teasersize}} < 66 || ({{this.isMixed}} && window.innerWidth < 768) || {{this.isDropdown}} ? 'shadow-[0_13px_27px_-2px_rgba(50,50,93,0.25)]' : ''"
|
|
3
3
|
class="flex flex-wrap w-full m-0 last:border-b-0">
|
|
4
4
|
|
|
5
5
|
{{~#each this.contentNavEntries~}}
|
|
@@ -25,3 +25,4 @@
|
|
|
25
25
|
{{~/if~}}
|
|
26
26
|
{{~/each~}}
|
|
27
27
|
</ul>
|
|
28
|
+
|
package/{src/stories/views/components/base/menu → dist/views/components/content_nav}/dropdown.hbs
RENAMED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
<nav
|
|
2
|
-
x-init="init()"
|
|
1
|
+
<nav
|
|
3
2
|
class="w-full {{_componentClass}} {{_modifier}} "
|
|
4
3
|
id="dropdown--{{nextRandom}}"
|
|
5
4
|
tabindex="0"
|
|
6
5
|
role="navigation"
|
|
7
6
|
aria-labelledby="dropdown__label--{{getRandom}}">
|
|
7
|
+
|
|
8
8
|
<span id="o-dropdown__label--{{getRandom}}" class="hidden">{{defaultIfEmpty _hiddenNavigationLabel "Unternavigation"}}</span>
|
|
9
|
+
|
|
9
10
|
<div x-show="shouldDropdownBeShown({{_teasersize}},{{this.isDropdown}},{{this.isMixed}})"
|
|
10
11
|
class="flex w-full h-8 overflow-hidden bg-white border rounded border-blue-congress whitespace-nowrap text-blue-congress fill-congress" >
|
|
11
12
|
|
|
@@ -22,52 +23,10 @@
|
|
|
22
23
|
</span>
|
|
23
24
|
</div>
|
|
24
25
|
|
|
25
|
-
</div>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
26
28
|
<div x-show="shouldContentBeShown({{_teasersize}},{{this.isDropdown}},{{this.isMixed}})" aria-haspopup="true" class="md:relative md:left-0 md:h-auto md:overflow-visible">
|
|
27
29
|
{{> @partial-block }}
|
|
28
30
|
</div>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<script type="text/javascript">
|
|
32
|
-
document.addEventListener('alpine:init', () => {
|
|
33
|
-
Alpine.data('contentNavigationHandler', () =>({
|
|
34
|
-
open: false,
|
|
35
|
-
|
|
36
|
-
init(){
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
shouldDropdownBeShown(teasersize,isDropdown,isMixed){
|
|
40
|
-
if (isDropdown){
|
|
41
|
-
return true
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (isMixed) {
|
|
45
|
-
if (teasersize === 100 || teasersize === 66 ) {
|
|
46
|
-
if (this.$screen('lg')) return false
|
|
47
|
-
if (this.$screen('md')) return false
|
|
48
|
-
if (this.$screen('xs')) return true
|
|
49
|
-
} else if (teasersize === 33 || teasersize === 25 || teasersize === 50) {
|
|
50
|
-
return true
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
shouldContentBeShown(teasersize,isDropdown,isMixed){
|
|
56
|
-
if (isDropdown){
|
|
57
|
-
return this.open
|
|
58
|
-
}
|
|
59
|
-
if (isMixed) {
|
|
60
|
-
if (teasersize === 100 || teasersize === 66 ) {
|
|
61
|
-
if (this.$screen('lg')) return true
|
|
62
|
-
if (this.$screen('md')) return true
|
|
63
|
-
if (this.$screen('xs')) return this.open
|
|
64
|
-
} else if (teasersize === 33 || teasersize === 25 || teasersize === 50) {
|
|
65
|
-
return this.open
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return false
|
|
70
|
-
}
|
|
71
|
-
}))
|
|
72
|
-
})
|
|
73
|
-
</script>
|
|
31
|
+
|
|
32
|
+
</nav>
|
|
@@ -344,4 +344,41 @@ document.addEventListener('alpine:init', () => {
|
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}))
|
|
347
|
+
|
|
348
|
+
Alpine.data('contentNavigationHandler', () =>({
|
|
349
|
+
open: false,
|
|
350
|
+
|
|
351
|
+
shouldDropdownBeShown(teasersize,isDropdown,isMixed){
|
|
352
|
+
if (isDropdown){
|
|
353
|
+
return true
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
if (isMixed) {
|
|
357
|
+
if (teasersize === 100 || teasersize === 66 ) {
|
|
358
|
+
if (this.$screen('lg')) return false
|
|
359
|
+
if (this.$screen('md')) return false
|
|
360
|
+
if (this.$screen('xs')) return true
|
|
361
|
+
} else if (teasersize === 33 || teasersize === 25 || teasersize === 50) {
|
|
362
|
+
return true
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
|
|
367
|
+
shouldContentBeShown(teasersize,isDropdown,isMixed){
|
|
368
|
+
if (isDropdown){
|
|
369
|
+
return this.open
|
|
370
|
+
}
|
|
371
|
+
if (isMixed) {
|
|
372
|
+
if (teasersize === 100 || teasersize === 66 ) {
|
|
373
|
+
if (this.$screen('lg')) return true
|
|
374
|
+
if (this.$screen('md')) return true
|
|
375
|
+
if (this.$screen('xs')) return this.open
|
|
376
|
+
} else if (teasersize === 33 || teasersize === 25 || teasersize === 50) {
|
|
377
|
+
return this.open
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
return false
|
|
382
|
+
}
|
|
383
|
+
}))
|
|
347
384
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<div class="col-span-12 flex gap-y-3 gap-x-4 {{inline-switch this.teasersize '["100","66","50","33","25"]' '["flex-col","md:col-span-9 md:flex-row ","md:col-span-6 md:flex-row "," md:col-span-4 md:flex-row "," md:col-span-3 md:flex-row "]'}}">
|
|
1
|
+
<div x-data="contentNavigationHandler()" class="col-span-12 flex gap-y-3 gap-x-4 {{inline-switch this.teasersize '["100","66","50","33","25"]' '["flex-col","md:col-span-9 md:flex-row ","md:col-span-6 md:flex-row "," md:col-span-4 md:flex-row "," md:col-span-3 md:flex-row "]'}}">
|
|
2
2
|
|
|
3
3
|
{{#if this.contentNav.isDropdown}}
|
|
4
4
|
|
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.55.
|
|
9
|
+
"version": "0.55.3",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
12
|
"storybook": "start-storybook -p 6006 public",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"realTeasersize" : "
|
|
3
|
-
"teasersize" : "
|
|
2
|
+
"realTeasersize" : "100",
|
|
3
|
+
"teasersize" : "100",
|
|
4
4
|
|
|
5
5
|
"contentNav" : {
|
|
6
6
|
"title" : "Geiler Titel",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"isDropdown" : false,
|
|
9
9
|
"isList" : false,
|
|
10
10
|
"isMixed" : true,
|
|
11
|
-
"
|
|
11
|
+
"isAutosuggest" : true,
|
|
12
12
|
"selectedItem": {
|
|
13
13
|
"title" : "Themen Wirtschaft"
|
|
14
14
|
},
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
{{#with this.contentNav}}
|
|
1
|
+
{{#with this.contentNav}}
|
|
2
2
|
{{#if this.isList}}
|
|
3
3
|
<nav class="c-content-nav {{../_modifier}} ">
|
|
4
4
|
{{> components/content_nav/content_nav_list _teasersize=../_teasersize}}
|
|
5
5
|
</nav>
|
|
6
6
|
{{else}}
|
|
7
|
-
{{#>components/
|
|
7
|
+
{{#>components/content_nav/dropdown
|
|
8
8
|
_componentClass="c-content-nav"
|
|
9
9
|
_teasersize=../_teasersize
|
|
10
10
|
_iconOpen="arrow-down"
|
|
@@ -14,18 +14,19 @@
|
|
|
14
14
|
}}
|
|
15
15
|
<div x-on:click.outside ="open = false;" class="flex flex-wrap {{#if this.isAutosuggest}} autoSuggest js-load{{/if}}"
|
|
16
16
|
{{#if this.isAutosuggest}}
|
|
17
|
-
data-hr-auto-suggest='{"filterGroupsSelector":".c-content-nav__group", "filterElementSelector":".c-content-nav__item", "filterTextSelector":".js-title", "inputElementSelector":".js-autosuggest-input", "matchedClass":"", "unmatchedClass":"hidden"}'
|
|
18
|
-
|
|
17
|
+
data-hr-auto-suggest='{"filterGroupsSelector":".c-content-nav__group", "filterElementSelector":".c-content-nav__item", "filterTextSelector":".js-title", "inputElementSelector":".js-autosuggest-input", "matchedClass":"", "unmatchedClass":"hidden"}'
|
|
18
|
+
{{/if}}
|
|
19
|
+
>
|
|
20
|
+
{{#if this.isAutosuggest}}
|
|
19
21
|
<div class="flex w-full h-10 my-2 c-content-nav__autosuggest border-blue-congress align-center">
|
|
20
22
|
<input x-ref="autosuggestInput" class="w-full pl-4 focus:outline-none js-autosuggest-input" type="text"
|
|
21
23
|
placeholder="Eintrag filtern"/>
|
|
22
24
|
</div>
|
|
23
25
|
{{/if}}
|
|
24
|
-
|
|
25
26
|
{{> components/content_nav/content_nav_list _teasersize=_teasersize}}
|
|
26
27
|
|
|
27
28
|
</div>
|
|
28
|
-
{{/components/
|
|
29
|
+
{{/components/content_nav/dropdown}}
|
|
29
30
|
|
|
30
|
-
{{/if}}
|
|
31
|
+
{{/if}}
|
|
31
32
|
{{/with}}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
<li :class="{{_isdropdown}} ? '!w-full md:!w-full mb-2 md:mb-0 md:!mr-0 border-l-0 border-r-0 border-t-0 border-b last:border-b-0 !rounded-none '
|
|
2
2
|
: {{_ismixed}} && {{_teasersize}} >= 66 ? '!w-full md:!w-fit md:!mr-2 !mb-0 md:!mb-2 border-l-0 border-r-0 border-t-0 border-b last:border-b-0 rounded-none md:!border md:!rounded'
|
|
3
3
|
: {{_ismixed}} && {{_teasersize}} <= 50 ? '!w-full border-b !mb-0 last:border-b-0'
|
|
4
|
-
: {{_islist}} ? 'border rounded mb-2 '
|
|
4
|
+
: {{_islist}} ? 'border rounded mb-2 last:mb-0 md:last:mb-2'
|
|
5
5
|
: '' "
|
|
6
|
-
|
|
7
6
|
class="{{inline-switch _teasersize '["100","66","50","33","25"]' '["w-full md:w-fit md:mr-2","w-fit mb-2 md:mr-2","w-full mb-2","w-full mb-2","w-full mb-2"]'}} overflow-hidden text-base font-copy list-none border-blue-congress fill-congress hover:fill-white text-blue-congress hover:text-white hover:underline {{#if this.isSelected}} -current{{/if}} c-content-nav__item">
|
|
8
7
|
{{#>components/base/link.hbs
|
|
9
8
|
_doNavigationTracking="true"
|
|
10
9
|
_clickLabelType="Contentnavigation"
|
|
11
10
|
_clickLabelPrefix1=this.title
|
|
12
|
-
_css="flex items-center py-2 px-4
|
|
11
|
+
_css="flex items-center py-2 px-4 h-8 bg-white hover:bg-blue-congress rounded-sm whitespace-nowrap overflow-hidden"
|
|
13
12
|
_isSelected=this.isSelected
|
|
14
13
|
_selectedCssClass="is-selected"
|
|
15
14
|
}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<ul
|
|
2
|
-
|
|
1
|
+
<ul {{!-- x-init="addDependentCssToUl({{this.isMixed}},{{this.isDropdown}},{{_teasersize}})" --}}
|
|
2
|
+
:class="{{this.isMixed}} && {{_teasersize}} < 66 || ({{this.isMixed}} && window.innerWidth < 768) || {{this.isDropdown}} ? 'shadow-[0_13px_27px_-2px_rgba(50,50,93,0.25)]' : ''"
|
|
3
3
|
class="flex flex-wrap w-full m-0 last:border-b-0">
|
|
4
4
|
|
|
5
5
|
{{~#each this.contentNavEntries~}}
|
|
@@ -25,3 +25,4 @@
|
|
|
25
25
|
{{~/if~}}
|
|
26
26
|
{{~/each~}}
|
|
27
27
|
</ul>
|
|
28
|
+
|
package/{dist/views/components/base/menu → src/stories/views/components/content_nav}/dropdown.hbs
RENAMED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
<nav
|
|
2
|
-
x-init="init()"
|
|
1
|
+
<nav
|
|
3
2
|
class="w-full {{_componentClass}} {{_modifier}} "
|
|
4
3
|
id="dropdown--{{nextRandom}}"
|
|
5
4
|
tabindex="0"
|
|
6
5
|
role="navigation"
|
|
7
6
|
aria-labelledby="dropdown__label--{{getRandom}}">
|
|
7
|
+
|
|
8
8
|
<span id="o-dropdown__label--{{getRandom}}" class="hidden">{{defaultIfEmpty _hiddenNavigationLabel "Unternavigation"}}</span>
|
|
9
|
+
|
|
9
10
|
<div x-show="shouldDropdownBeShown({{_teasersize}},{{this.isDropdown}},{{this.isMixed}})"
|
|
10
11
|
class="flex w-full h-8 overflow-hidden bg-white border rounded border-blue-congress whitespace-nowrap text-blue-congress fill-congress" >
|
|
11
12
|
|
|
@@ -22,52 +23,10 @@
|
|
|
22
23
|
</span>
|
|
23
24
|
</div>
|
|
24
25
|
|
|
25
|
-
</div>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
26
28
|
<div x-show="shouldContentBeShown({{_teasersize}},{{this.isDropdown}},{{this.isMixed}})" aria-haspopup="true" class="md:relative md:left-0 md:h-auto md:overflow-visible">
|
|
27
29
|
{{> @partial-block }}
|
|
28
30
|
</div>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<script type="text/javascript">
|
|
32
|
-
document.addEventListener('alpine:init', () => {
|
|
33
|
-
Alpine.data('contentNavigationHandler', () =>({
|
|
34
|
-
open: false,
|
|
35
|
-
|
|
36
|
-
init(){
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
shouldDropdownBeShown(teasersize,isDropdown,isMixed){
|
|
40
|
-
if (isDropdown){
|
|
41
|
-
return true
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (isMixed) {
|
|
45
|
-
if (teasersize === 100 || teasersize === 66 ) {
|
|
46
|
-
if (this.$screen('lg')) return false
|
|
47
|
-
if (this.$screen('md')) return false
|
|
48
|
-
if (this.$screen('xs')) return true
|
|
49
|
-
} else if (teasersize === 33 || teasersize === 25 || teasersize === 50) {
|
|
50
|
-
return true
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
shouldContentBeShown(teasersize,isDropdown,isMixed){
|
|
56
|
-
if (isDropdown){
|
|
57
|
-
return this.open
|
|
58
|
-
}
|
|
59
|
-
if (isMixed) {
|
|
60
|
-
if (teasersize === 100 || teasersize === 66 ) {
|
|
61
|
-
if (this.$screen('lg')) return true
|
|
62
|
-
if (this.$screen('md')) return true
|
|
63
|
-
if (this.$screen('xs')) return this.open
|
|
64
|
-
} else if (teasersize === 33 || teasersize === 25 || teasersize === 50) {
|
|
65
|
-
return this.open
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return false
|
|
70
|
-
}
|
|
71
|
-
}))
|
|
72
|
-
})
|
|
73
|
-
</script>
|
|
31
|
+
|
|
32
|
+
</nav>
|
|
@@ -344,4 +344,41 @@ document.addEventListener('alpine:init', () => {
|
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}))
|
|
347
|
+
|
|
348
|
+
Alpine.data('contentNavigationHandler', () =>({
|
|
349
|
+
open: false,
|
|
350
|
+
|
|
351
|
+
shouldDropdownBeShown(teasersize,isDropdown,isMixed){
|
|
352
|
+
if (isDropdown){
|
|
353
|
+
return true
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
if (isMixed) {
|
|
357
|
+
if (teasersize === 100 || teasersize === 66 ) {
|
|
358
|
+
if (this.$screen('lg')) return false
|
|
359
|
+
if (this.$screen('md')) return false
|
|
360
|
+
if (this.$screen('xs')) return true
|
|
361
|
+
} else if (teasersize === 33 || teasersize === 25 || teasersize === 50) {
|
|
362
|
+
return true
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
|
|
367
|
+
shouldContentBeShown(teasersize,isDropdown,isMixed){
|
|
368
|
+
if (isDropdown){
|
|
369
|
+
return this.open
|
|
370
|
+
}
|
|
371
|
+
if (isMixed) {
|
|
372
|
+
if (teasersize === 100 || teasersize === 66 ) {
|
|
373
|
+
if (this.$screen('lg')) return true
|
|
374
|
+
if (this.$screen('md')) return true
|
|
375
|
+
if (this.$screen('xs')) return this.open
|
|
376
|
+
} else if (teasersize === 33 || teasersize === 25 || teasersize === 50) {
|
|
377
|
+
return this.open
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
return false
|
|
382
|
+
}
|
|
383
|
+
}))
|
|
347
384
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<div class="col-span-12 flex gap-y-3 gap-x-4 {{inline-switch this.teasersize '["100","66","50","33","25"]' '["flex-col","md:col-span-9 md:flex-row ","md:col-span-6 md:flex-row "," md:col-span-4 md:flex-row "," md:col-span-3 md:flex-row "]'}}">
|
|
1
|
+
<div x-data="contentNavigationHandler()" class="col-span-12 flex gap-y-3 gap-x-4 {{inline-switch this.teasersize '["100","66","50","33","25"]' '["flex-col","md:col-span-9 md:flex-row ","md:col-span-6 md:flex-row "," md:col-span-4 md:flex-row "," md:col-span-3 md:flex-row "]'}}">
|
|
2
2
|
|
|
3
3
|
{{#if this.contentNav.isDropdown}}
|
|
4
4
|
|