hr-design-system-handlebars 1.11.9 → 1.11.11

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.
Files changed (129) hide show
  1. package/.babelrc.json +14 -0
  2. package/.storybook/main.js +34 -52
  3. package/.storybook/preview-head.html +4 -1
  4. package/.storybook/preview.js +25 -35
  5. package/CHANGELOG.md +30 -0
  6. package/dist/assets/index.css +11 -3
  7. package/dist/views/components/base/load_dynamic.hbs +3 -0
  8. package/dist/views/components/teaser/ticker/teaser_ticker.hbs +29 -0
  9. package/package.json +20 -13
  10. package/src/assets/css/custom-utilities.css +3 -3
  11. package/src/assets/fixtures/teaser/teaser_ticker.inc.json +121 -0
  12. package/src/assets/fixtures/teaser/ticker_teaser_standard_100.json +25 -0
  13. package/src/assets/images/sportschau-image-5708_v-16to9.jpg +0 -0
  14. package/src/assets/images/sportschau-image-5708_v-16to9__medium.jpg +0 -0
  15. package/src/assets/images/sportschau-image-5708_v-16to9__retina.jpg +0 -0
  16. package/src/assets/images/sportschau-image-5708_v-16to9__small.jpg +0 -0
  17. package/src/assets/images/sportschau-image-5708_v-1to1.jpg +0 -0
  18. package/src/assets/images/sportschau-image-5708_v-1to1__large.jpg +0 -0
  19. package/src/assets/images/sportschau-image-5708_v-1to1__medium.jpg +0 -0
  20. package/src/assets/images/sportschau-image-5708_v-1to1__small.jpg +0 -0
  21. package/src/stories/BrandColors.data.js +42 -0
  22. package/src/stories/BrandColors.mdx +25 -0
  23. package/src/stories/{Colors.stories.mdx → Colors.data.js} +2 -18
  24. package/src/stories/Colors.mdx +19 -0
  25. package/src/stories/Example.mdx +56 -0
  26. package/src/stories/Example.stories.js +57 -0
  27. package/src/stories/{Fixtures.stories.mdx → Fixtures.mdx} +3 -5
  28. package/src/stories/{InstallAndUpdate.stories.mdx → InstallAndUpdate.mdx} +0 -2
  29. package/src/stories/Introduction.mdx +3 -0
  30. package/src/stories/{SvgOptimization.stories.mdx → SvgOptimization.mdx} +0 -2
  31. package/src/stories/{Typography.stories.mdx → Typography.mdx} +13 -14
  32. package/src/stories/{conventions-and-datastructure.stories.mdx → conventions-and-datastructure.mdx} +7 -9
  33. package/src/stories/views/components/Button.mdx +30 -0
  34. package/src/stories/views/components/Button_.stories.js +77 -0
  35. package/src/stories/views/components/base/load_dynamic.hbs +3 -0
  36. package/src/stories/views/components/event/calendar/{event_calendar_components.stories.mdx → event_calendar_components.mdx} +31 -87
  37. package/src/stories/views/components/event/calendar/event_calendar_components.stories.js +129 -0
  38. package/src/stories/views/components/geoTag/geoTag.mdx +32 -0
  39. package/src/stories/views/components/geoTag/geoTag.stories.js +35 -0
  40. package/src/stories/views/components/grid/grid.mdx +210 -0
  41. package/src/stories/views/components/grid/grid.stories.js +148 -0
  42. package/src/stories/views/components/label/label.mdx +54 -0
  43. package/src/stories/views/components/label/label.stories.js +183 -0
  44. package/src/stories/views/components/page/page.data.js +17 -0
  45. package/src/stories/views/components/page/page.mdx +110 -0
  46. package/src/stories/views/components/page/page.stories.js +50 -0
  47. package/src/stories/views/components/page/page_pagination.data.js +8 -0
  48. package/src/stories/views/components/page/page_pagination.mdx +8 -0
  49. package/src/stories/views/components/page/page_pagination.stories.js +34 -0
  50. package/src/stories/views/components/page/page_player.mdx +21 -0
  51. package/src/stories/views/components/page/page_player.stories.js +34 -0
  52. package/src/stories/views/components/site_header/{header.stories.mdx → header.mdx} +218 -152
  53. package/src/stories/views/components/site_header/header.stories.js +62 -0
  54. package/src/stories/views/components/teaser/cluster/teaser_cluster.mdx +32 -0
  55. package/src/stories/views/components/teaser/cluster/teaser_cluster.stories.js +146 -0
  56. package/src/stories/views/components/teaser/components/teaser_byline.mdx +97 -0
  57. package/src/stories/views/components/teaser/components/teaser_byline.stories.js +30 -0
  58. package/src/stories/views/components/teaser/components/teaser_heading.mdx +96 -0
  59. package/src/stories/views/components/teaser/components/teaser_heading.stories.js +158 -0
  60. package/src/stories/views/components/teaser/components/teaser_text.mdx +36 -0
  61. package/src/stories/views/components/teaser/components/teaser_text.stories.js +74 -0
  62. package/src/stories/views/components/teaser/components/teaser_title.mdx +42 -0
  63. package/src/stories/views/components/teaser/components/teaser_title.stories.js +85 -0
  64. package/src/stories/views/components/teaser/components/teaser_topline.mdx +29 -0
  65. package/src/stories/views/components/teaser/components/teaser_topline.stories.js +27 -0
  66. package/src/stories/views/components/teaser/content_nav/teaser_content_nav.mdx +54 -0
  67. package/src/stories/views/components/teaser/content_nav/{teaser_content_nav.stories.mdx → teaser_content_nav.stories.js} +80 -61
  68. package/src/stories/views/components/teaser/fixtures/ticker_teaser_standard_100.json +1 -0
  69. package/src/stories/views/components/teaser/group_teaser/group.mdx +18 -0
  70. package/src/stories/views/components/teaser/group_teaser/group.stories.js +85 -0
  71. package/src/stories/views/components/teaser/podcast/podcast.mdx +11 -0
  72. package/src/stories/views/components/teaser/podcast/{podcast.stories.mdx → podcast.stories.js} +50 -39
  73. package/src/stories/views/components/teaser/podcast/podcast_subscribe_button.mdx +10 -0
  74. package/src/stories/views/components/teaser/podcast/podcast_subscribe_button.stories.js +51 -0
  75. package/src/stories/views/components/teaser/tabbox/teaser_tabbox.mdx +10 -0
  76. package/src/stories/views/components/teaser/tabbox/teaser_tabbox.stories.js +40 -0
  77. package/src/stories/views/components/teaser/teaser_alternativ.mdx +76 -0
  78. package/src/stories/views/components/teaser/teaser_alternativ.stories.js +126 -0
  79. package/src/stories/views/components/teaser/teaser_alternativ_av.mdx +75 -0
  80. package/src/stories/views/components/teaser/teaser_alternativ_av.stories.js +111 -0
  81. package/src/stories/views/components/teaser/teaser_event_calendar.mdx +57 -0
  82. package/src/stories/views/components/teaser/teaser_event_calendar.stories.js +92 -0
  83. package/src/stories/views/components/teaser/teaser_indextext.mdx +35 -0
  84. package/src/stories/views/components/teaser/teaser_indextext.stories.js +85 -0
  85. package/src/stories/views/components/teaser/teaser_logic/teaser_logic.mdx +23 -0
  86. package/src/stories/views/components/teaser/teaser_logic/teaser_logic.stories.js +36 -0
  87. package/src/stories/views/components/teaser/teaser_poster.mdx +95 -0
  88. package/src/stories/views/components/teaser/teaser_poster.stories.js +67 -0
  89. package/src/stories/views/components/teaser/teaser_stage.mdx +15 -0
  90. package/src/stories/views/components/teaser/teaser_stage.stories.js +60 -0
  91. package/src/stories/views/components/teaser/teaser_standard.mdx +129 -0
  92. package/src/stories/views/components/teaser/teaser_standard.stories.js +166 -0
  93. package/src/stories/views/components/teaser/teaser_standard_av.mdx +38 -0
  94. package/src/stories/views/components/teaser/teaser_standard_av.stories.js +117 -0
  95. package/src/stories/views/components/teaser/teaser_standard_event.mdx +103 -0
  96. package/src/stories/views/components/teaser/teaser_standard_event.stories.js +119 -0
  97. package/src/stories/views/components/teaser/ticker/teaser_ticker.hbs +29 -0
  98. package/src/stories/views/components/teaser/ticker/teaser_ticker.mdx +10 -0
  99. package/src/stories/views/components/teaser/ticker/teaser_ticker.stories.js +34 -0
  100. package/.storybook/withThemeDecorator.js +0 -12
  101. package/src/stories/BrandColors.stories.mdx +0 -39
  102. package/src/stories/Example.stories.mdx +0 -93
  103. package/src/stories/Introduction.stories.mdx +0 -211
  104. package/src/stories/views/components/Button.stories.mdx +0 -82
  105. package/src/stories/views/components/geoTag/geoTag.stories.mdx +0 -61
  106. package/src/stories/views/components/grid/grid.stories.mdx +0 -275
  107. package/src/stories/views/components/label/label.stories.mdx +0 -200
  108. package/src/stories/views/components/page/page.stories.mdx +0 -144
  109. package/src/stories/views/components/page/page_pagination.stories.mdx +0 -36
  110. package/src/stories/views/components/page/page_player.stories.mdx +0 -43
  111. package/src/stories/views/components/teaser/cluster/teaser_cluster.stories.mdx +0 -97
  112. package/src/stories/views/components/teaser/components/teaser_byline.stories.mdx +0 -78
  113. package/src/stories/views/components/teaser/components/teaser_heading.stories.mdx +0 -219
  114. package/src/stories/views/components/teaser/components/teaser_text.stories.mdx +0 -94
  115. package/src/stories/views/components/teaser/components/teaser_title.stories.mdx +0 -124
  116. package/src/stories/views/components/teaser/components/teaser_topline.stories.mdx +0 -63
  117. package/src/stories/views/components/teaser/group_teaser/group.stories.mdx +0 -85
  118. package/src/stories/views/components/teaser/podcast/podcast_subscribe_button.stories.mdx +0 -52
  119. package/src/stories/views/components/teaser/tabbox/teaser_tabbox.stories.mdx +0 -39
  120. package/src/stories/views/components/teaser/teaser_alternativ.stories.mdx +0 -163
  121. package/src/stories/views/components/teaser/teaser_alternativ_av.stories.mdx +0 -142
  122. package/src/stories/views/components/teaser/teaser_event_calendar.stories.mdx +0 -131
  123. package/src/stories/views/components/teaser/teaser_indextext.stories.mdx +0 -111
  124. package/src/stories/views/components/teaser/teaser_logic/teaser_logic.stories.mdx +0 -39
  125. package/src/stories/views/components/teaser/teaser_poster.stories.mdx +0 -130
  126. package/src/stories/views/components/teaser/teaser_stage.stories.mdx +0 -53
  127. package/src/stories/views/components/teaser/teaser_standard.stories.mdx +0 -170
  128. package/src/stories/views/components/teaser/teaser_standard_av.stories.mdx +0 -95
  129. package/src/stories/views/components/teaser/teaser_standard_event.stories.mdx +0 -150
@@ -1,163 +0,0 @@
1
- import { ArgsTable, Meta, Story, Canvas, Preview } from '@storybook/addon-docs'
2
- import 'core-js/actual/structured-clone'
3
- import { addLabel, removeLabel, changeTeaserSize } from './labelHelper'
4
- import { addCommentLink } from './jsonHelper'
5
- import teaser from './teaser_alternativ.hbs'
6
- import heroTeaser from './fixtures/teaser_alternative_hero_serif.json'
7
- import heroTeaserWithLabel from './fixtures/teaser_alternative_hero_serif_label.json'
8
- import heroTeaserWithComments from './fixtures/teaser_alternative_hero_serif_comments.json'
9
- import heroTeaserLink from './fixtures/teaser_alternative_hero_serif_link.json'
10
- import heroTeaserProgram from './fixtures/teaser_alternative_hero_serif_program.json'
11
- import teaser100Link from './fixtures/teaser_alternative_100_serif_link.json'
12
- import teaser100 from './fixtures/teaser_alternative_100_serif.json'
13
- import teaser50 from './fixtures/teaser_alternative_50_serif.json'
14
- import teaser50WithoutTeaserImage from './fixtures/teaser_alternative_without_teaserimage_50_serif.json'
15
- import teaser50Link from './fixtures/teaser_alternative_50_serif_link.json'
16
- import teaser50Download from './fixtures/teaser_alternative_50_serif_download.json'
17
-
18
- <Meta
19
- title="Komponenten/Teaser/Alternativ"
20
- parameters={{
21
- layout: 'fullscreen',
22
- chromatic: {
23
- viewports: [360, 1024],
24
- diffThreshold: 0.5,
25
- },
26
- }}
27
- argTypes={{
28
- teaserSize: {
29
- control: {
30
- type: 'select',
31
- options: ['hero', '100', '50'],
32
- },
33
- description: 'Teaser Größ',
34
- table: {
35
- defaultValue: {
36
- summary: 'hero',
37
- },
38
- },
39
- },
40
- }}
41
- decorators={[
42
- (Story) => {
43
- return `<div class="grid grid-page"><div class="grid grid-cols-12 py-6 col-full gap-x-6 gap-y-6 sm:px-9.5 sm:col-main">
44
- ${Story()}
45
- </div></div>`
46
- },
47
- ]}
48
- />
49
-
50
- export const Template = (args, { globals: { customConditionalToolbar } }) => {
51
- // You can either use a function to create DOM elements or use a plain html string!
52
- // return `<div>${label}</div>`;
53
- let brand =
54
- undefined !== customConditionalToolbar ? customConditionalToolbar['brands'] : 'hessenschau'
55
- return teaser({ brand, ...args })
56
- }
57
-
58
- # Alternativ-Teaser
59
-
60
- ## Beschreibung
61
-
62
- Der Alternativ-Teaser besteht aus 2 Hauptelemente: <b>Bild</b> und <b>Text</b> (Label, Dachzeile, Titel, Teasertext, Zusatzinformationen)
63
-
64
- <b>Alternativ Hero:</b> <br />
65
- Desktop = Bild(66%) neben Text(33%) <br />
66
- Mobile = Verhalten wie bei 100% Standard-Teaser <br />
67
-
68
- <b>Alternativ 100%:</b> <br />
69
- Desktop = Bild(33%) neben Text(66%) <br />
70
- Mobile = Verhalten wie bei 100% Standard-Teaser <br />
71
-
72
- <b>Alternativ 50%:</b> <br />
73
- Desktop = Bild(33%) neben Text(66%) <br />
74
- Mobile = Verhalten wie bei 100% Standard-Teaser <br />
75
-
76
- <b>Alternativ 50% mit Download:</b> <br />
77
- Desktop = Bild(33%) neben Text(66%) <br />
78
- Mobile = Verhalten wie bei 100% Standard-Teaser <br />{' '}
79
-
80
- Der Alternativ-Teaser soll nur als 100%- bzw. 50%-Teaser verwendet werden.
81
-
82
- ## Sub-Komponenten
83
-
84
- Die Alternativ-Teaser-Komponente inkludiert folgende Komponenten:
85
-
86
- <ul>
87
- <li>
88
- components/base/image/<b>responsive_image</b>
89
- </li>
90
- <li>
91
- components/base/<b>link</b>
92
- </li>
93
- <li>
94
- components/teaser/components/<b>teaser_heading</b>
95
- </li>
96
- <li>
97
- components/teaser/components/<b>teaser_text</b>
98
- </li>
99
- <li>
100
- components/teaser/components/<b>teaser_byline</b>
101
- </li>
102
- </ul>
103
-
104
- ## Verwendung
105
-
106
- Die Alternativ-Teaser-Komponente wird in handlebars wie folgt eingebaut:
107
-
108
- ```html
109
- {{> components/teaser/teaser_alternativ}}
110
- ```
111
-
112
- <Preview withToolbar>
113
- <b>Alternativ Hero</b>
114
- <Story name="Alternativ Hero" args={heroTeaser.logicItem.includeModel}>
115
- {Template.bind({})}
116
- </Story>
117
- <Story
118
- name="Alternativ Hero mit Kommentaren"
119
- args={heroTeaserWithComments.logicItem.includeModel}
120
- >
121
- {Template.bind({})}
122
- </Story>
123
- <Story name="Alternativ Hero mit Label" args={heroTeaserWithLabel.logicItem.includeModel}>
124
- {Template.bind({})}
125
- </Story>
126
- <Story
127
- name="Alternativ Hero mit externen Link Dokument"
128
- args={heroTeaserLink.logicItem.includeModel}
129
- >
130
- {Template.bind({})}
131
- </Story>
132
- <Story
133
- name="Alternativ Hero mit Sendungsdokument"
134
- args={heroTeaserProgram.logicItem.includeModel}
135
- >
136
- {Template.bind({})}
137
- </Story>
138
- <b>Alternativ 100%</b>
139
- <Story name="Alternativ 100" args={teaser100.logicItem.includeModel}>
140
- {Template.bind({})}
141
- </Story>
142
- <b>Alternativ 100% mit externem Link</b>
143
- <Story name="Alternativ 100 mit externem Link" args={teaser100Link.logicItem.includeModel}>
144
- {Template.bind({})}
145
- </Story>
146
- <b>Alternativ 50%</b>
147
- <Story name="Alternativ 50" args={teaser50.logicItem.includeModel}>
148
- {Template.bind({})}
149
- </Story>
150
- <Story
151
- name="Alternativ 50 ohne Teaserbild"
152
- args={teaser50WithoutTeaserImage.logicItem.includeModel}
153
- >
154
- {Template.bind({})}
155
- </Story>
156
- <b>Alternativ 50% mit externem Link</b>
157
- <Story name="Alternativ 50 mit externem Link" args={teaser50Link.logicItem.includeModel}>
158
- {Template.bind({})}
159
- </Story>
160
- <Story name="Alternativ 50 mit Download" args={teaser50Download.logicItem.includeModel}>
161
- {Template.bind({})}
162
- </Story>
163
- </Preview>
@@ -1,142 +0,0 @@
1
- import { ArgsTable, Meta, Story, Canvas, Preview } from '@storybook/addon-docs'
2
- import 'core-js/actual/structured-clone'
3
- import { addLabel, removeLabel, changeTeaserSize } from './labelHelper'
4
- import { addCommentLink } from './jsonHelper'
5
- import teaser from './teaser_alternativ.hbs'
6
- import heroTeaser_video from './fixtures/teaser_alternative_hero_serif_video.json'
7
- import heroTeaser_audio from './fixtures/teaser_alternative_hero_serif_audio.json'
8
- import heroTeaser_live from './fixtures/teaser_alternative_hero_serif_live.json'
9
- import teaser100_video from './fixtures/teaser_alternative_100_serif_video.json'
10
- import teaser100_audio from './fixtures/teaser_alternative_100_serif_audio.json'
11
- import teaser100_live from './fixtures/teaser_alternative_100_serif_live.json'
12
- import teaser50_video from './fixtures/teaser_alternative_50_serif_video.json'
13
- import teaser50_audio from './fixtures/teaser_alternative_50_serif_audio.json'
14
- import teaser50_live from './fixtures/teaser_alternative_50_serif_live.json'
15
-
16
- <Meta
17
- title="Komponenten/Teaser/AV-Alternativ"
18
- parameters={{
19
- layout: 'fullscreen',
20
- chromatic: {
21
- viewports: [360, 1024],
22
- },
23
- }}
24
- argTypes={{
25
- teaserSize: {
26
- control: {
27
- type: 'select',
28
- options: ['hero', '100', '50'],
29
- },
30
- description: 'Teaser Größe',
31
- table: {
32
- defaultValue: {
33
- summary: 'hero',
34
- },
35
- },
36
- },
37
- }}
38
- decorators={[
39
- (Story) => {
40
- return `<div class="grid grid-page"><div class="grid grid-cols-12 py-6 col-full gap-x-6 gap-y-6 sm:px-9.5 sm:col-main">
41
- ${Story()}
42
- </div></div>`
43
- },
44
- ]}
45
- />
46
-
47
- export const Template = (args, { globals: { customConditionalToolbar } }) => {
48
- // You can either use a function to create DOM elements or use a plain html string!
49
- // return `<div>${label}</div>`;
50
- let brand =
51
- undefined !== customConditionalToolbar ? customConditionalToolbar['brands'] : 'hessenschau'
52
- return teaser({ brand, ...args })
53
- }
54
-
55
- # Alternativ-Teaser
56
-
57
- ## Beschreibung
58
-
59
- Der Alternativ-Teaser besteht aus 2 Hauptelemente: <b>Bild</b> und <b>Text</b> (Label, Dachzeile, Titel, Teasertext, Zusatzinformationen)
60
-
61
- <b>Alternativ Hero:</b> <br />
62
- Desktop = Bild(66%) neben Text(33%) <br />
63
- Mobile = Verhalten wie bei 100% Standard-Teaser <br />
64
-
65
- <b>Alternativ 100%:</b> <br />
66
- Desktop = Bild(33%) neben Text(66%) <br />
67
- Mobile = Verhalten wie bei 100% Standard-Teaser <br />
68
-
69
- <b>Alternativ 50%:</b> <br />
70
- Desktop = Bild(33%) neben Text(66%) <br />
71
- Mobile = Verhalten wie bei 100% Standard-Teaser <br />
72
-
73
- Der Alternativ-Teaser soll nur als 100%- bzw. 50%-Teaser verwendet werden.
74
-
75
- ## Sub-Komponenten
76
-
77
- Die Alternativ-Teaser-Komponente inkludiert folgende Komponenten:
78
-
79
- <ul>
80
- <li>
81
- components/base/image/<b>responsive_image</b>
82
- </li>
83
- <li>
84
- components/base/<b>link</b>
85
- </li>
86
- <li>
87
- components/teaser/components/<b>teaser_heading</b>
88
- </li>
89
- <li>
90
- components/teaser/components/<b>teaser_text</b>
91
- </li>
92
- <li>
93
- components/teaser/components/<b>teaser_byline</b>
94
- </li>
95
- </ul>
96
-
97
- ## Verwendung
98
-
99
- Die Alternativ-Teaser-Komponente wird in handlebars wie folgt eingebaut:
100
-
101
- ```html
102
- {{> components/teaser/teaser_alternativ}}
103
- ```
104
-
105
- <Preview withToolbar>
106
- <b>Alternativ Hero Video</b>
107
- <Story name="Alternativ Hero Video" args={heroTeaser_video.logicItem.includeModel}>
108
- {Template.bind({})}
109
- </Story>
110
- <b>Alternativ Hero Audio</b>
111
- <Story name="Alternativ Hero Audio" args={heroTeaser_audio.logicItem.includeModel}>
112
- {Template.bind({})}
113
- </Story>
114
- <b>Alternativ Hero Live</b>
115
- <Story name="Alternativ Hero Live" args={heroTeaser_live.logicItem.includeModel}>
116
- {Template.bind({})}
117
- </Story>
118
- <b>Alternativ 100% Video</b>
119
- <Story name="Alternativ 100 Video" args={teaser100_video.logicItem.includeModel}>
120
- {Template.bind({})}
121
- </Story>
122
- <b>Alternativ 100% Audio</b>
123
- <Story name="Alternativ 100 Audio" args={teaser100_audio.logicItem.includeModel}>
124
- {Template.bind({})}
125
- </Story>
126
- <b>Alternativ 100% Live</b>
127
- <Story name="Alternativ 100 Live" args={teaser100_live.logicItem.includeModel}>
128
- {Template.bind({})}
129
- </Story>
130
- <b>Alternativ 50% Video</b>
131
- <Story name="Alternativ 50 Video" args={teaser50_video.logicItem.includeModel}>
132
- {Template.bind({})}
133
- </Story>
134
- <b>Alternativ 50% Audio</b>
135
- <Story name="Alternativ 50 Audio" args={teaser50_audio.logicItem.includeModel}>
136
- {Template.bind({})}
137
- </Story>
138
- <b>Alternativ 50% Live</b>
139
- <Story name="Alternativ 50 Live" args={teaser50_live.logicItem.includeModel}>
140
- {Template.bind({})}
141
- </Story>
142
- </Preview>
@@ -1,131 +0,0 @@
1
- import { ArgsTable, Meta, Story, Canvas, Preview } from '@storybook/addon-docs'
2
- import teaserEventCalendar from '../../components/teaser/teaser_event_calendar.hbs'
3
- import teaserEventCalendar100Serif from './fixtures/teaser_event_calendar_100_serif.json'
4
- import teaserEventCalendarWithNoFutureEventsData from './fixtures/teaser_event_calendar_100_no_future_events.json'
5
-
6
- <Meta
7
- title="Komponenten/Teaser/Eventkalender"
8
- parameters={{
9
- layout: 'fullscreen',
10
- }}
11
- argTypes={{
12
- teaserSize: {
13
- control: {
14
- type: 'select',
15
- options: ['50', '100'],
16
- },
17
- description: 'Teaser Größe',
18
- table: {
19
- defaultValue: {
20
- summary: '100',
21
- },
22
- },
23
- },
24
- }}
25
- decorators={[
26
- (Story) => {
27
- return `<div class="grid grid-page"><div class="grid grid-cols-12 py-6 col-full gap-x-6 gap-y-6 sm:px-9.5 sm:col-main">
28
- ${Story()}
29
- </div></div>`
30
- },
31
- ]}
32
- />
33
-
34
- export const TemplateEventCalendarTeaser = (args, { globals: { customConditionalToolbar } }) => {
35
- // You can either use a function to create DOM elements or use a plain html string!
36
- // return `<div>${label}</div>`;
37
- let brand =
38
- undefined !== customConditionalToolbar ? customConditionalToolbar['brands'] : 'hessenschau'
39
- return teaserEventCalendar({ brand, ...args })
40
- }
41
-
42
- # Standard-Teaser
43
-
44
- ## Beschreibung
45
-
46
- Der Standard-Teaser besteht aus 2 Hauptelemente: <b>Bild</b> und <b>Text</b> (Label, Dachzeile, Titel, Teasertext, Zusatzinformationen)
47
-
48
- <b>Standard 33 Single Event:</b> <br />
49
- Desktop = Text unter dem Bild <br />
50
- Mobile = Text unter dem Bild mit Teasertext <br />
51
-
52
- <b>Standard 33 Two Events:</b> <br />
53
- Desktop = Text unter dem Bild <br />
54
- Mobile = Text unter dem Bild mit Teasertext <br />
55
-
56
- <b>Standard 33 Multiple Events:</b> <br />
57
- Desktop = Text unter dem Bild <br />
58
- Mobile = Text unter dem Bild mit Teasertext <br />{' '}
59
-
60
- ## Sub-Komponenten
61
-
62
- Die Standard-Teaser-Komponente inkludiert folgende Komponenten:
63
-
64
- <ul>
65
- <li>
66
- components/teaser/components/<b>teaser_lead</b>
67
- </li>
68
- <li>
69
- components/base/<b>link</b>
70
- </li>
71
- <li>
72
- components/teaser/components/<b>teaser_heading</b>
73
- </li>
74
- <li>
75
- components/teaser/components/<b>teaser_text</b>
76
- </li>
77
- <li>
78
- components/teaser/components/<b>teaser_byline</b>
79
- </li>
80
- </ul>
81
-
82
- ## Verwendung
83
-
84
- Die Standard-Teaser-Komponente wird in handlebars wie folgt eingebaut:
85
-
86
- ```html
87
- {{> components/teaser/teaser_standard_event}}
88
- ```
89
-
90
- <Preview withToolbar>
91
- <Story
92
- name="Teaser 100"
93
- argTypes={{
94
- teaserSize: {
95
- control: {
96
- type: 'select',
97
- options: ['50', '100'],
98
- },
99
- description: 'Teaser Größe',
100
- table: {
101
- defaultValue: {
102
- summary: '100',
103
- },
104
- },
105
- },
106
- }}
107
- args={teaserEventCalendar100Serif.logicItem.includeModel}
108
- >
109
- {TemplateEventCalendarTeaser.bind({})}
110
- </Story>
111
- <Story
112
- name="Teaser 100 Keine Events in der Zukunft"
113
- argTypes={{
114
- teaserSize: {
115
- control: {
116
- type: 'select',
117
- options: ['50', '100'],
118
- },
119
- description: 'Teaser Größe',
120
- table: {
121
- defaultValue: {
122
- summary: '100',
123
- },
124
- },
125
- },
126
- }}
127
- args={teaserEventCalendarWithNoFutureEventsData.logicItem.includeModel}
128
- >
129
- {TemplateEventCalendarTeaser.bind({})}
130
- </Story>
131
- </Preview>
@@ -1,111 +0,0 @@
1
- import { ArgsTable, Meta, Story, Canvas, Preview } from '@storybook/addon-docs'
2
- import teaser from './teaser_indextext.hbs'
3
- import dataTeserIndextext100Accented from './fixtures/teaser_indextext_100_accented.json'
4
- import dataTeserIndextext100Boxed from './fixtures/teaser_indextext_100_boxed.json'
5
- import dataTeserIndextext100Highlighted from './fixtures/teaser_indextext_100_highlighted.json'
6
- import dataTeserIndextext50Accented from './fixtures/teaser_indextext_50_accented.json'
7
-
8
- <Meta
9
- title="Komponenten/Teaser/Indextext"
10
- parameters={{
11
- layout: 'fullscreen',
12
- }}
13
- argTypes={{
14
- teaserSize: {
15
- control: {
16
- type: 'select',
17
- options: ['50', '100'],
18
- },
19
- description: 'Teaser Größe',
20
- table: {
21
- defaultValue: {
22
- summary: '100',
23
- },
24
- },
25
- },
26
- teasertype: {
27
- control: {
28
- type: 'select',
29
- options: ['accented', 'boxed', 'highlighted'],
30
- },
31
- description: 'Teaser Typ',
32
- table: {
33
- defaultValue: {
34
- summary: 'accented',
35
- },
36
- },
37
- },
38
- }}
39
- decorators={[
40
- (Story) => {
41
- return `<div class="grid grid-page"><div class="grid grid-cols-12 py-6 col-full gap-x-6 gap-y-6 sm:px-9.5 sm:col-main">
42
- ${Story()}
43
- </div></div>`
44
- },
45
- ]}
46
- />
47
-
48
- export const Template = (args, { globals: { customConditionalToolbar } }) => {
49
- // You can either use a function to create DOM elements or use a plain html string!
50
- // return `<div>${label}</div>`;
51
- let brand =
52
- undefined !== customConditionalToolbar ? customConditionalToolbar['brands'] : 'hessenschau'
53
- return teaser({ brand, ...args })
54
- }
55
-
56
- # Indextext-Teaser
57
-
58
- ## Beschreibung
59
-
60
- ## Props
61
-
62
- Die Indextext-Teaser-Komponente benötigt die folgenden json-Daten (enthalten im Teaser-Json im Objekt <b>logicItem.includeModel</b>):
63
-
64
- <ul>
65
- <li>
66
- <b>title</b>
67
- </li>
68
- <li>
69
- <b>shorttext</b>
70
- </li>
71
- <li>
72
- <b>teaserSize</b>
73
- </li>
74
- <li>
75
- <b>teaserType</b>
76
- </li>
77
- </ul>
78
-
79
- ## Verwendung
80
-
81
- Die Indextext-Teaser-Komponente wird in handlebars wie folgt eingebaut:
82
-
83
- ```html
84
- {{> components/teaser/teaser_indextext}}
85
- ```
86
-
87
- <Preview withToolbar>
88
- <Story
89
- name="Text mit Hintergrund 100"
90
- args={dataTeserIndextext100Accented.logicItem.includeModel}
91
- >
92
- {Template.bind({})}
93
- </Story>
94
- <Story name="Text mit Box 100" args={dataTeserIndextext100Boxed.logicItem.includeModel}>
95
- {Template.bind({})}
96
- </Story>
97
- <Story
98
- name="Hintergrund orange 100"
99
- args={dataTeserIndextext100Highlighted.logicItem.includeModel}
100
- >
101
- {Template.bind({})}
102
- </Story>
103
- <Story
104
- name="Text mit Hintergrund 50"
105
- args={dataTeserIndextext50Accented.logicItem.includeModel}
106
- >
107
- {Template.bind({})}
108
- </Story>
109
- </Preview>
110
-
111
- <ArgsTable story="Text mit Hintergrund 100" />
@@ -1,39 +0,0 @@
1
- import { ArgsTable, Meta, Story, Canvas, Preview } from '@storybook/addon-docs'
2
-
3
- import teaser from './teaser_logic.hbs'
4
- import index_site from '../fixtures/teaser_index.json'
5
-
6
- <Meta
7
- title="Komponenten/Teaser/Logic"
8
- parameters={{
9
- layout: 'fullscreen',
10
- }}
11
- argTypes={{}}
12
- decorators={[
13
- (Story) => {
14
- return `<div class="grid bg-white grid-page">
15
- <div class="grid grid-cols-12 py-6 bg-white sm:px-9.5 col-full sm:col-main gap-x-6 gap-y-6">
16
- ${Story()}
17
- </div>
18
- </div>`
19
- },
20
- ]}
21
- />
22
-
23
- export const Template = (args, { globals: { customConditionalToolbar } }) => {
24
- // You can either use a function to create DOM elements or use a plain html string!
25
- // return `<div>${label}</div>`;
26
- let brand =
27
- undefined !== customConditionalToolbar ? customConditionalToolbar['brands'] : 'hessenschau'
28
- return teaser({ brand, ...args })
29
- }
30
-
31
- # Header
32
-
33
- Ein toller Einleitungstext für unsere `Teaser` Komponente:
34
-
35
- <Preview withToolbar>
36
- <Story name="logic" args={index_site}>
37
- {Template.bind({})}
38
- </Story>
39
- </Preview>