hr-design-system-handlebars 1.75.1 → 1.75.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/CHANGELOG.md +24 -0
- package/dist/assets/icons/icons/svgmap/copy-ds.svg +5 -21
- package/dist/assets/icons/icons/svgmap.min.svg +1 -1
- package/dist/assets/index.css +46 -22
- package/dist/assets/js/alpine.js +3 -2
- package/dist/views/components/content/copytext/components/paragraph/paragraph_body.hbs +3 -3
- package/dist/views/components/page/components/metadatabox.hbs +1 -1
- package/dist/views/components/social_sharing/social_sharing_copytext.hbs +1 -1
- package/dist/views/components/social_sharing/social_sharing_horizontal.hbs +72 -0
- package/{src/stories/views/components/social_sharing/social_sharing_compact_icons.hbs → dist/views/components/social_sharing/social_sharing_icons.hbs} +46 -43
- package/dist/views/components/social_sharing/social_sharing_mobile.hbs +71 -0
- package/dist/views/components/teaser/teaser_poster.hbs +8 -6
- package/dist/views/components/top_button/top_button.hbs +19 -13
- package/dist/views_static/components/content/copytext/components/paragraph/paragraph_body.hbs +3 -3
- package/dist/views_static/components/page/components/metadatabox.hbs +1 -1
- package/dist/views_static/components/social_sharing/social_sharing_copytext.hbs +1 -1
- package/dist/views_static/components/social_sharing/social_sharing_horizontal.hbs +72 -0
- package/dist/{views/components/social_sharing/social_sharing_compact_icons.hbs → views_static/components/social_sharing/social_sharing_icons.hbs} +46 -43
- package/dist/views_static/components/social_sharing/social_sharing_mobile.hbs +71 -0
- package/dist/views_static/components/teaser/teaser_poster.hbs +8 -6
- package/dist/views_static/components/top_button/top_button.hbs +19 -13
- package/package.json +1 -1
- package/src/assets/fixtures/content/copytext/copytext_posterteaser.json +12 -0
- package/src/assets/fixtures/page/metadatabox.json +2 -1
- package/src/assets/fixtures/page/metadatabox_comments.json +2 -1
- package/src/assets/fixtures/page/metadatabox_more_authors.json +2 -1
- package/src/assets/fixtures/page/metadatabox_more_authors_comments.json +2 -1
- package/src/assets/fixtures/page/metadatabox_one_author.json +2 -1
- package/src/assets/fixtures/page/metadatabox_one_author_comments.json +2 -1
- package/src/assets/fixtures/page/metadatabox_one_author_without_picture.json +2 -1
- package/src/assets/fixtures/page/story/story.inc.json +2 -1
- package/src/assets/fixtures/socialsharing/socialsharing.inc.json +2 -1
- package/src/assets/fixtures/teaser/teaser_poster_lg.json +4 -0
- package/src/assets/fixtures/teaser/teaser_poster_md.json +4 -0
- package/src/assets/fixtures/teaser/teaser_poster_md_label.json +1 -1
- package/src/assets/fixtures/teaser/teaser_poster_md_label_byline.json +50 -0
- package/src/assets/icons/icons/svgmap/copy-ds.svg +5 -21
- package/src/assets/icons/icons/svgmap.min.svg +1 -1
- package/src/assets/js/alpine.js +3 -2
- package/src/stories/views/components/content/copytext/components/paragraph/paragraph_body.hbs +3 -3
- package/src/stories/views/components/content/copytext/fixtures/copytext_posterteaser.json +1 -1
- package/src/stories/views/components/page/components/metadatabox.hbs +1 -1
- package/src/stories/views/components/page/fixtures/metadatabox.json +1 -1
- package/src/stories/views/components/page/fixtures/metadatabox_comments.json +1 -1
- package/src/stories/views/components/page/fixtures/metadatabox_more_authors.json +1 -1
- package/src/stories/views/components/page/fixtures/metadatabox_more_authors_comments.json +1 -1
- package/src/stories/views/components/page/fixtures/metadatabox_one_author.json +1 -1
- package/src/stories/views/components/page/fixtures/metadatabox_one_author_comments.json +1 -1
- package/src/stories/views/components/page/fixtures/metadatabox_one_author_without_picture.json +1 -1
- package/src/stories/views/components/page/story/fixtures/story.json +1 -1
- package/src/stories/views/components/page/story/fixtures/story_with_label.json +1 -1
- package/src/stories/views/components/page/story/fixtures/story_with_livestream.json +1 -1
- package/src/stories/views/components/page/story/fixtures/story_with_square_image.json +1 -1
- package/src/stories/views/components/page/story/fixtures/story_with_video.json +1 -1
- package/src/stories/views/components/social_sharing/{social_sharing_compact.mdx → social_sharing.mdx} +1 -1
- package/src/stories/views/components/social_sharing/social_sharing.stories.js +45 -0
- package/src/stories/views/components/social_sharing/social_sharing_copytext.hbs +1 -1
- package/src/stories/views/components/social_sharing/social_sharing_horizontal.hbs +72 -0
- package/{dist/views_static/components/social_sharing/social_sharing_compact_icons.hbs → src/stories/views/components/social_sharing/social_sharing_icons.hbs} +46 -43
- package/src/stories/views/components/social_sharing/social_sharing_mobile.hbs +71 -0
- package/src/stories/views/components/teaser/fixtures/teaser_poster_lg.json +1 -1
- package/src/stories/views/components/teaser/fixtures/teaser_poster_md.json +1 -1
- package/src/stories/views/components/teaser/fixtures/teaser_poster_md_label.json +1 -1
- package/src/stories/views/components/teaser/fixtures/teaser_poster_md_label_byline.json +1 -0
- package/src/stories/views/components/teaser/teaser_poster.hbs +8 -6
- package/src/stories/views/components/teaser/teaser_poster.stories.js +7 -0
- package/src/stories/views/components/top_button/top_button.hbs +19 -13
- package/dist/views/components/social_sharing/social_sharing_compact.hbs +0 -87
- package/dist/views_static/components/social_sharing/social_sharing_compact.hbs +0 -87
- package/src/stories/views/components/social_sharing/social_sharing_compact.hbs +0 -87
- package/src/stories/views/components/social_sharing/social_sharing_compact.stories.js +0 -18
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
{{~#with this.socialSharing ~}}
|
|
2
|
-
<div x-data="stickySharingHandler"
|
|
3
|
-
x-on:keydown.escape.prevent.stop="close($refs.button)"
|
|
4
|
-
x-on:focusin.window="! $refs.panel.contains($event.target) && close()"
|
|
5
|
-
x-id="['dropdown-button']"
|
|
6
|
-
class="flex self-center justify-end ml-3 grow"
|
|
7
|
-
x-intersect:leave="$store.sharingIsVisible=false"
|
|
8
|
-
x-intersect:enter="$store.sharingIsVisible=true"
|
|
9
|
-
>
|
|
10
|
-
<div :class="{ 'grid grid-page z-110 fixed bottom-feature-box-height left-0 w-full': $store.sharingIsVisible == false}">
|
|
11
|
-
<div :class="{ 'flex justify-start col-full sm:col-main relative': $store.sharingIsVisible == false }">
|
|
12
|
-
<div :style="($store.footerIsVisible && !$screen('lg')) && {bottom:$store.sharingBottomPos.current}"
|
|
13
|
-
:class="{ 'bottom-[19px] flex-col absolute mt-3 rounded-md': $store.sharingIsVisible == false && $store.footerIsVisible == false,
|
|
14
|
-
'flex-col absolute mt-3' : !$screen('lg') && $store.footerIsVisible == true && window.innerHeight > document.querySelector('#content').offsetHeight + document.querySelector('.sb-main-navigation').offsetHeight + (window.innerHeight - document.querySelector('footer').offsetTop) - document.querySelector('footer').offsetHeight}"
|
|
15
|
-
class="flex self-center gap-3 bg-white left-5">
|
|
16
|
-
<button
|
|
17
|
-
class="{{#with ../this.trackingData}}js-load {{/with}}order-2 p-2 text-white border border-button bg-button ds-button font-heading hover:bg-button--dark hover:border-button--dark active:bg-button--dark group"
|
|
18
|
-
x-show="!$screen('lg')"
|
|
19
|
-
x-ref="button"
|
|
20
|
-
x-on:click="toggle()"
|
|
21
|
-
:aria-expanded="open"
|
|
22
|
-
:aria-controls="$id('dropdown-button')"
|
|
23
|
-
|
|
24
|
-
{{#with ../this.trackingData}}
|
|
25
|
-
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::sharingmenuopened"}]}'
|
|
26
|
-
{{/with}}
|
|
27
|
-
|
|
28
|
-
>
|
|
29
|
-
{{> components/base/image/icon _addClass="w-5 h-5 fill-current group-hover:fill-link--dark" _icon="sharing" _iconmap="icons" }}
|
|
30
|
-
</button>
|
|
31
|
-
|
|
32
|
-
<!-- Panel -->
|
|
33
|
-
<div
|
|
34
|
-
x-ref="panel"
|
|
35
|
-
x-show="open || $screen('lg') && $store.sharingIsOpen == true || $screen('lg') && $store.sharingIsVisible == true"
|
|
36
|
-
x-transition.origin.bottom.right
|
|
37
|
-
x-on:click.outside="close($refs.button)"
|
|
38
|
-
:id="$id('dropdown-button')"
|
|
39
|
-
class="self-center bg-white"
|
|
40
|
-
:class="$store.sharingIsVisible == true ? 'h-8 absolute right-[68px] md:relative md:right-0 md:h-auto' : 'relative right-0 md:h-auto lg:hidden '"
|
|
41
|
-
>
|
|
42
|
-
<ul class="flex gap-3" :class="{ 'flex-col': $store.sharingIsVisible == false }">
|
|
43
|
-
{{> components/social_sharing/social_sharing_compact_icons _trackingData=../this.trackingData}}
|
|
44
|
-
</ul>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
{{/with}}
|
|
51
|
-
<script>
|
|
52
|
-
function stickySharingHandler(){
|
|
53
|
-
return {
|
|
54
|
-
open: this.$store.sharingIsOpen,
|
|
55
|
-
sharingIsVisible: true,
|
|
56
|
-
isDesktop: true,
|
|
57
|
-
toggle() {
|
|
58
|
-
var isMobileApple = navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)/i);
|
|
59
|
-
var isMobileOther= navigator.userAgent.match(/(Android)|(webOS)|(Blackberry)|(Windows Phone)/i);
|
|
60
|
-
var isMobile= isMobileApple || isMobileOther;
|
|
61
|
-
if (navigator.share && isMobile) {
|
|
62
|
-
navigator.share({
|
|
63
|
-
title: document.title,
|
|
64
|
-
text: 'Schau mal was ich auf hessenschau.de gefunden habe!',
|
|
65
|
-
url: window.location.href,
|
|
66
|
-
})
|
|
67
|
-
.then(() => console.log('Shared successfully'))
|
|
68
|
-
.catch((error) => console.error('Sharing failed:', error));
|
|
69
|
-
} else {
|
|
70
|
-
if (this.open) {
|
|
71
|
-
return this.close()
|
|
72
|
-
}
|
|
73
|
-
this.$refs.button.focus()
|
|
74
|
-
this.open = true
|
|
75
|
-
this.$store.sharingIsOpen = true
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
close(focusAfter) {
|
|
80
|
-
if (! this.open) return
|
|
81
|
-
this.open = false
|
|
82
|
-
this.$store.sharingIsOpen = false
|
|
83
|
-
focusAfter && focusAfter.focus()
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
</script>
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
{{~#with this.socialSharing ~}}
|
|
2
|
-
<div x-data="stickySharingHandler"
|
|
3
|
-
x-on:keydown.escape.prevent.stop="close($refs.button)"
|
|
4
|
-
x-on:focusin.window="! $refs.panel.contains($event.target) && close()"
|
|
5
|
-
x-id="['dropdown-button']"
|
|
6
|
-
class="flex self-center justify-end ml-3 grow"
|
|
7
|
-
x-intersect:leave="$store.sharingIsVisible=false"
|
|
8
|
-
x-intersect:enter="$store.sharingIsVisible=true"
|
|
9
|
-
>
|
|
10
|
-
<div :class="{ 'grid grid-page z-110 fixed bottom-feature-box-height left-0 w-full': $store.sharingIsVisible == false}">
|
|
11
|
-
<div :class="{ 'flex justify-start col-full sm:col-main relative': $store.sharingIsVisible == false }">
|
|
12
|
-
<div :style="($store.footerIsVisible && !$screen('lg')) && {bottom:$store.sharingBottomPos.current}"
|
|
13
|
-
:class="{ 'bottom-[19px] flex-col absolute mt-3 rounded-md': $store.sharingIsVisible == false && $store.footerIsVisible == false,
|
|
14
|
-
'flex-col absolute mt-3' : !$screen('lg') && $store.footerIsVisible == true && window.innerHeight > document.querySelector('#content').offsetHeight + document.querySelector('.sb-main-navigation').offsetHeight + (window.innerHeight - document.querySelector('footer').offsetTop) - document.querySelector('footer').offsetHeight}"
|
|
15
|
-
class="flex self-center gap-3 bg-white left-5">
|
|
16
|
-
<button
|
|
17
|
-
class="{{#with ../this.trackingData}}js-load {{/with}}order-2 p-2 text-white border border-button bg-button ds-button font-heading hover:bg-button--dark hover:border-button--dark active:bg-button--dark group"
|
|
18
|
-
x-show="!$screen('lg')"
|
|
19
|
-
x-ref="button"
|
|
20
|
-
x-on:click="toggle()"
|
|
21
|
-
:aria-expanded="open"
|
|
22
|
-
:aria-controls="$id('dropdown-button')"
|
|
23
|
-
|
|
24
|
-
{{#with ../this.trackingData}}
|
|
25
|
-
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::sharingmenuopened"}]}'
|
|
26
|
-
{{/with}}
|
|
27
|
-
|
|
28
|
-
>
|
|
29
|
-
{{> components/base/image/icon _addClass="w-5 h-5 fill-current group-hover:fill-link--dark" _icon="sharing" _iconmap="icons" }}
|
|
30
|
-
</button>
|
|
31
|
-
|
|
32
|
-
<!-- Panel -->
|
|
33
|
-
<div
|
|
34
|
-
x-ref="panel"
|
|
35
|
-
x-show="open || $screen('lg') && $store.sharingIsOpen == true || $screen('lg') && $store.sharingIsVisible == true"
|
|
36
|
-
x-transition.origin.bottom.right
|
|
37
|
-
x-on:click.outside="close($refs.button)"
|
|
38
|
-
:id="$id('dropdown-button')"
|
|
39
|
-
class="self-center bg-white"
|
|
40
|
-
:class="$store.sharingIsVisible == true ? 'h-8 absolute right-[68px] md:relative md:right-0 md:h-auto' : 'relative right-0 md:h-auto lg:hidden '"
|
|
41
|
-
>
|
|
42
|
-
<ul class="flex gap-3" :class="{ 'flex-col': $store.sharingIsVisible == false }">
|
|
43
|
-
{{> components/social_sharing/social_sharing_compact_icons _trackingData=../this.trackingData}}
|
|
44
|
-
</ul>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
{{/with}}
|
|
51
|
-
<script>
|
|
52
|
-
function stickySharingHandler(){
|
|
53
|
-
return {
|
|
54
|
-
open: this.$store.sharingIsOpen,
|
|
55
|
-
sharingIsVisible: true,
|
|
56
|
-
isDesktop: true,
|
|
57
|
-
toggle() {
|
|
58
|
-
var isMobileApple = navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)/i);
|
|
59
|
-
var isMobileOther= navigator.userAgent.match(/(Android)|(webOS)|(Blackberry)|(Windows Phone)/i);
|
|
60
|
-
var isMobile= isMobileApple || isMobileOther;
|
|
61
|
-
if (navigator.share && isMobile) {
|
|
62
|
-
navigator.share({
|
|
63
|
-
title: document.title,
|
|
64
|
-
text: 'Schau mal was ich auf hessenschau.de gefunden habe!',
|
|
65
|
-
url: window.location.href,
|
|
66
|
-
})
|
|
67
|
-
.then(() => console.log('Shared successfully'))
|
|
68
|
-
.catch((error) => console.error('Sharing failed:', error));
|
|
69
|
-
} else {
|
|
70
|
-
if (this.open) {
|
|
71
|
-
return this.close()
|
|
72
|
-
}
|
|
73
|
-
this.$refs.button.focus()
|
|
74
|
-
this.open = true
|
|
75
|
-
this.$store.sharingIsOpen = true
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
close(focusAfter) {
|
|
80
|
-
if (! this.open) return
|
|
81
|
-
this.open = false
|
|
82
|
-
this.$store.sharingIsOpen = false
|
|
83
|
-
focusAfter && focusAfter.focus()
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
</script>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import story_template from './social_sharing_compact.hbs'
|
|
2
|
-
import socialSharing from '../page/story/fixtures/story.json'
|
|
3
|
-
|
|
4
|
-
console.log(socialSharing)
|
|
5
|
-
const Template = ({ ...args }) => {
|
|
6
|
-
return story_template({ ...args })
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
title: 'Komponenten/Social Sharing',
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const Default = {
|
|
14
|
-
render: Template.bind({}),
|
|
15
|
-
name: 'Social Sharing Kompakt',
|
|
16
|
-
args: socialSharing
|
|
17
|
-
|
|
18
|
-
}
|