hr-design-system-handlebars 1.11.10 → 1.11.12

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 (130) 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 +29 -0
  6. package/dist/assets/index.css +11 -3
  7. package/dist/views/components/page/page_pagination.hbs +1 -1
  8. package/dist/views/components/pagination/pagination.hbs +15 -14
  9. package/dist/views/components/pagination/pagination_current_page_invalid.hbs +1 -1
  10. package/dist/views/components/pagination/pagination_current_page_valid.hbs +2 -1
  11. package/dist/views/components/pagination/pagination_more_than_three_pages.hbs +3 -3
  12. package/dist/views/components/pagination/pagination_only_three_pages.hbs +7 -7
  13. package/dist/views/components/pagination/pagination_only_two_pages.hbs +2 -2
  14. package/package.json +20 -13
  15. package/src/assets/css/custom-utilities.css +3 -3
  16. package/src/assets/fixtures/page/page_pagination.json +15 -14
  17. package/src/stories/BrandColors.data.js +42 -0
  18. package/src/stories/BrandColors.mdx +25 -0
  19. package/src/stories/{Colors.stories.mdx → Colors.data.js} +2 -18
  20. package/src/stories/Colors.mdx +19 -0
  21. package/src/stories/Example.mdx +56 -0
  22. package/src/stories/Example.stories.js +57 -0
  23. package/src/stories/{Fixtures.stories.mdx → Fixtures.mdx} +3 -5
  24. package/src/stories/{InstallAndUpdate.stories.mdx → InstallAndUpdate.mdx} +0 -2
  25. package/src/stories/Introduction.mdx +3 -0
  26. package/src/stories/{SvgOptimization.stories.mdx → SvgOptimization.mdx} +0 -2
  27. package/src/stories/{Typography.stories.mdx → Typography.mdx} +13 -14
  28. package/src/stories/{conventions-and-datastructure.stories.mdx → conventions-and-datastructure.mdx} +7 -9
  29. package/src/stories/views/components/Button.mdx +30 -0
  30. package/src/stories/views/components/Button_.stories.js +77 -0
  31. package/src/stories/views/components/event/calendar/{event_calendar_components.stories.mdx → event_calendar_components.mdx} +31 -87
  32. package/src/stories/views/components/event/calendar/event_calendar_components.stories.js +129 -0
  33. package/src/stories/views/components/geoTag/geoTag.mdx +32 -0
  34. package/src/stories/views/components/geoTag/geoTag.stories.js +35 -0
  35. package/src/stories/views/components/grid/grid.mdx +210 -0
  36. package/src/stories/views/components/grid/grid.stories.js +148 -0
  37. package/src/stories/views/components/label/label.mdx +54 -0
  38. package/src/stories/views/components/label/label.stories.js +183 -0
  39. package/src/stories/views/components/page/fixtures/page_pagination.json +1 -1
  40. package/src/stories/views/components/page/page.data.js +17 -0
  41. package/src/stories/views/components/page/page.mdx +110 -0
  42. package/src/stories/views/components/page/page.stories.js +50 -0
  43. package/src/stories/views/components/page/page_pagination.data.js +8 -0
  44. package/src/stories/views/components/page/page_pagination.hbs +1 -1
  45. package/src/stories/views/components/page/page_pagination.mdx +8 -0
  46. package/src/stories/views/components/page/page_pagination.stories.js +34 -0
  47. package/src/stories/views/components/page/page_player.mdx +21 -0
  48. package/src/stories/views/components/page/page_player.stories.js +34 -0
  49. package/src/stories/views/components/pagination/pagination.hbs +15 -14
  50. package/src/stories/views/components/pagination/pagination_current_page_invalid.hbs +1 -1
  51. package/src/stories/views/components/pagination/pagination_current_page_valid.hbs +2 -1
  52. package/src/stories/views/components/pagination/pagination_more_than_three_pages.hbs +3 -3
  53. package/src/stories/views/components/pagination/pagination_only_three_pages.hbs +7 -7
  54. package/src/stories/views/components/pagination/pagination_only_two_pages.hbs +2 -2
  55. package/src/stories/views/components/site_header/{header.stories.mdx → header.mdx} +218 -152
  56. package/src/stories/views/components/site_header/header.stories.js +62 -0
  57. package/src/stories/views/components/teaser/cluster/teaser_cluster.mdx +32 -0
  58. package/src/stories/views/components/teaser/cluster/teaser_cluster.stories.js +146 -0
  59. package/src/stories/views/components/teaser/components/teaser_byline.mdx +97 -0
  60. package/src/stories/views/components/teaser/components/teaser_byline.stories.js +30 -0
  61. package/src/stories/views/components/teaser/components/teaser_heading.mdx +96 -0
  62. package/src/stories/views/components/teaser/components/teaser_heading.stories.js +158 -0
  63. package/src/stories/views/components/teaser/components/teaser_text.mdx +36 -0
  64. package/src/stories/views/components/teaser/components/teaser_text.stories.js +74 -0
  65. package/src/stories/views/components/teaser/components/teaser_title.mdx +42 -0
  66. package/src/stories/views/components/teaser/components/teaser_title.stories.js +85 -0
  67. package/src/stories/views/components/teaser/components/teaser_topline.mdx +29 -0
  68. package/src/stories/views/components/teaser/components/teaser_topline.stories.js +27 -0
  69. package/src/stories/views/components/teaser/content_nav/teaser_content_nav.mdx +54 -0
  70. package/src/stories/views/components/teaser/content_nav/{teaser_content_nav.stories.mdx → teaser_content_nav.stories.js} +80 -61
  71. package/src/stories/views/components/teaser/group_teaser/group.mdx +18 -0
  72. package/src/stories/views/components/teaser/group_teaser/group.stories.js +85 -0
  73. package/src/stories/views/components/teaser/podcast/podcast.mdx +11 -0
  74. package/src/stories/views/components/teaser/podcast/{podcast.stories.mdx → podcast.stories.js} +50 -39
  75. package/src/stories/views/components/teaser/podcast/podcast_subscribe_button.mdx +10 -0
  76. package/src/stories/views/components/teaser/podcast/podcast_subscribe_button.stories.js +51 -0
  77. package/src/stories/views/components/teaser/tabbox/teaser_tabbox.mdx +10 -0
  78. package/src/stories/views/components/teaser/tabbox/teaser_tabbox.stories.js +40 -0
  79. package/src/stories/views/components/teaser/teaser_alternativ.mdx +76 -0
  80. package/src/stories/views/components/teaser/teaser_alternativ.stories.js +126 -0
  81. package/src/stories/views/components/teaser/teaser_alternativ_av.mdx +75 -0
  82. package/src/stories/views/components/teaser/teaser_alternativ_av.stories.js +111 -0
  83. package/src/stories/views/components/teaser/teaser_event_calendar.mdx +57 -0
  84. package/src/stories/views/components/teaser/teaser_event_calendar.stories.js +92 -0
  85. package/src/stories/views/components/teaser/teaser_indextext.mdx +35 -0
  86. package/src/stories/views/components/teaser/teaser_indextext.stories.js +85 -0
  87. package/src/stories/views/components/teaser/teaser_logic/teaser_logic.mdx +23 -0
  88. package/src/stories/views/components/teaser/teaser_logic/teaser_logic.stories.js +36 -0
  89. package/src/stories/views/components/teaser/teaser_poster.mdx +95 -0
  90. package/src/stories/views/components/teaser/teaser_poster.stories.js +67 -0
  91. package/src/stories/views/components/teaser/teaser_stage.mdx +15 -0
  92. package/src/stories/views/components/teaser/teaser_stage.stories.js +60 -0
  93. package/src/stories/views/components/teaser/teaser_standard.mdx +129 -0
  94. package/src/stories/views/components/teaser/teaser_standard.stories.js +166 -0
  95. package/src/stories/views/components/teaser/teaser_standard_av.mdx +38 -0
  96. package/src/stories/views/components/teaser/teaser_standard_av.stories.js +117 -0
  97. package/src/stories/views/components/teaser/teaser_standard_event.mdx +103 -0
  98. package/src/stories/views/components/teaser/teaser_standard_event.stories.js +119 -0
  99. package/src/stories/views/components/teaser/ticker/teaser_ticker.mdx +10 -0
  100. package/src/stories/views/components/teaser/ticker/{teaser_ticker.stories.mdx → teaser_ticker.stories.js} +25 -24
  101. package/.storybook/withThemeDecorator.js +0 -12
  102. package/src/stories/BrandColors.stories.mdx +0 -39
  103. package/src/stories/Example.stories.mdx +0 -93
  104. package/src/stories/Introduction.stories.mdx +0 -211
  105. package/src/stories/views/components/Button.stories.mdx +0 -82
  106. package/src/stories/views/components/geoTag/geoTag.stories.mdx +0 -61
  107. package/src/stories/views/components/grid/grid.stories.mdx +0 -275
  108. package/src/stories/views/components/label/label.stories.mdx +0 -200
  109. package/src/stories/views/components/page/page.stories.mdx +0 -144
  110. package/src/stories/views/components/page/page_pagination.stories.mdx +0 -36
  111. package/src/stories/views/components/page/page_player.stories.mdx +0 -43
  112. package/src/stories/views/components/teaser/cluster/teaser_cluster.stories.mdx +0 -97
  113. package/src/stories/views/components/teaser/components/teaser_byline.stories.mdx +0 -78
  114. package/src/stories/views/components/teaser/components/teaser_heading.stories.mdx +0 -219
  115. package/src/stories/views/components/teaser/components/teaser_text.stories.mdx +0 -94
  116. package/src/stories/views/components/teaser/components/teaser_title.stories.mdx +0 -124
  117. package/src/stories/views/components/teaser/components/teaser_topline.stories.mdx +0 -63
  118. package/src/stories/views/components/teaser/group_teaser/group.stories.mdx +0 -85
  119. package/src/stories/views/components/teaser/podcast/podcast_subscribe_button.stories.mdx +0 -52
  120. package/src/stories/views/components/teaser/tabbox/teaser_tabbox.stories.mdx +0 -39
  121. package/src/stories/views/components/teaser/teaser_alternativ.stories.mdx +0 -163
  122. package/src/stories/views/components/teaser/teaser_alternativ_av.stories.mdx +0 -142
  123. package/src/stories/views/components/teaser/teaser_event_calendar.stories.mdx +0 -131
  124. package/src/stories/views/components/teaser/teaser_indextext.stories.mdx +0 -111
  125. package/src/stories/views/components/teaser/teaser_logic/teaser_logic.stories.mdx +0 -39
  126. package/src/stories/views/components/teaser/teaser_poster.stories.mdx +0 -130
  127. package/src/stories/views/components/teaser/teaser_stage.stories.mdx +0 -53
  128. package/src/stories/views/components/teaser/teaser_standard.stories.mdx +0 -170
  129. package/src/stories/views/components/teaser/teaser_standard_av.stories.mdx +0 -95
  130. package/src/stories/views/components/teaser/teaser_standard_event.stories.mdx +0 -150
@@ -0,0 +1,38 @@
1
+ import { ArgsTable, Meta, Story, Canvas, Preview } from '@storybook/blocks'
2
+ import * as TeaserStandardAvStories from './teaser_standard_av.stories'
3
+
4
+ <Meta of={TeaserStandardAvStories} />
5
+
6
+ # Header
7
+
8
+ Ein toller Einleitungstext für unsere `Teaser` Komponente:
9
+
10
+ <Canvas withToolbar>
11
+ <Story of={TeaserStandardAvStories.Standard50Video} />
12
+
13
+ {' '}
14
+ <Story of={TeaserStandardAvStories.Standard25Video} />
15
+
16
+ {' '}
17
+ <Story of={TeaserStandardAvStories.Standard50VideoLivestream} />
18
+
19
+ {' '}
20
+ <Story of={TeaserStandardAvStories.Standard25VideoLivestream} />
21
+
22
+ {' '}
23
+ <Story of={TeaserStandardAvStories.Standard50Audio} />
24
+
25
+ {' '}
26
+ <Story of={TeaserStandardAvStories.Standard25Audio} />
27
+
28
+ {' '}
29
+ <Story of={TeaserStandardAvStories.Standard50Podcast} />
30
+
31
+ {' '}
32
+ <Story of={TeaserStandardAvStories.Standard25Podcast} />
33
+
34
+ {' '}
35
+ <Story of={TeaserStandardAvStories.Standard50AudioLivestream} />
36
+
37
+ <Story of={TeaserStandardAvStories.Standard25AudioLivestream} />
38
+ </Canvas>
@@ -0,0 +1,117 @@
1
+ import teaser from './teaser_standard.hbs'
2
+
3
+ import teaser50video from './fixtures/teaser_standard_50_serif_video.json'
4
+ import teaser25video from './fixtures/teaser_standard_25_serif_video.json'
5
+ import teaser50audio from './fixtures/teaser_standard_50_serif_audio.json'
6
+ import teaser50podcast from './fixtures/teaser_standard_50_serif_podcast.json'
7
+ import teaser25podcast from './fixtures/teaser_standard_25_serif_podcast.json'
8
+ import teaser50audioLivestream from './fixtures/teaser_standard_50_serif_audio_livestream.json'
9
+ import teaser25audio from './fixtures/teaser_standard_25_serif_audio.json'
10
+ import teaser25audioLivestream from './fixtures/teaser_standard_25_serif_audio_livestream.json'
11
+ import teaser50live from './fixtures/teaser_standard_50_serif_live.json'
12
+ import teaser25live from './fixtures/teaser_standard_25_serif_live.json'
13
+
14
+ const Template = (args, { globals: { customConditionalToolbar } }) => {
15
+ // You can either use a function to create DOM elements or use a plain html string!
16
+ // return `<div>${label}</div>`;
17
+ let brand =
18
+ undefined !== customConditionalToolbar ? customConditionalToolbar['brands'] : 'hessenschau'
19
+ return teaser({ brand, ...args })
20
+ }
21
+
22
+ export default {
23
+ title: 'Komponenten/Teaser/AV-Standard',
24
+
25
+ parameters: {
26
+ layout: 'fullscreen',
27
+
28
+ chromatic: {
29
+ diffThreshold: 0.5,
30
+ },
31
+ },
32
+
33
+ argTypes: {
34
+ teaserSize: {
35
+ control: {
36
+ type: 'select',
37
+ options: ['hero', '100', '50', '33', '25'],
38
+ },
39
+
40
+ description: 'Teaser Größe',
41
+
42
+ table: {
43
+ defaultValue: {
44
+ summary: 'hero',
45
+ },
46
+ },
47
+ },
48
+ },
49
+
50
+ decorators: [
51
+ (Story) => {
52
+ 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">
53
+ ${Story()}
54
+ </div></div>`
55
+ },
56
+ ],
57
+ }
58
+
59
+ export const Standard50Video = {
60
+ render: Template.bind({}),
61
+ name: 'Standard 50% Video',
62
+ args: teaser50video.logicItem.includeModel,
63
+ }
64
+
65
+ export const Standard25Video = {
66
+ render: Template.bind({}),
67
+ name: 'Standard 25% Video',
68
+ args: teaser25video.logicItem.includeModel,
69
+ }
70
+
71
+ export const Standard50VideoLivestream = {
72
+ render: Template.bind({}),
73
+ name: 'Standard 50% Video Livestream',
74
+ args: teaser50live.logicItem.includeModel,
75
+ }
76
+
77
+ export const Standard25VideoLivestream = {
78
+ render: Template.bind({}),
79
+ name: 'Standard 25% Video Livestream',
80
+ args: teaser25live.logicItem.includeModel,
81
+ }
82
+
83
+ export const Standard50Audio = {
84
+ render: Template.bind({}),
85
+ name: 'Standard 50% Audio',
86
+ args: teaser50audio.logicItem.includeModel,
87
+ }
88
+
89
+ export const Standard25Audio = {
90
+ render: Template.bind({}),
91
+ name: 'Standard 25% Audio',
92
+ args: teaser25audio.logicItem.includeModel,
93
+ }
94
+
95
+ export const Standard50Podcast = {
96
+ render: Template.bind({}),
97
+ name: 'Standard 50% Podcast',
98
+ args: teaser50podcast.logicItem.includeModel,
99
+ }
100
+
101
+ export const Standard25Podcast = {
102
+ render: Template.bind({}),
103
+ name: 'Standard 25% Podcast',
104
+ args: teaser25podcast.logicItem.includeModel,
105
+ }
106
+
107
+ export const Standard50AudioLivestream = {
108
+ render: Template.bind({}),
109
+ name: 'Standard 50% Audio Livestream',
110
+ args: teaser50audioLivestream.logicItem.includeModel,
111
+ }
112
+
113
+ export const Standard25AudioLivestream = {
114
+ render: Template.bind({}),
115
+ name: 'Standard 25% Audio Livestream',
116
+ args: teaser25audioLivestream.logicItem.includeModel,
117
+ }
@@ -0,0 +1,103 @@
1
+ import { ArgsTable, Meta, Story, Canvas } from '@storybook/blocks'
2
+
3
+ import * as TeaserStandardEventStories from './teaser_standard_event.stories'
4
+
5
+ <Meta of={TeaserStandardEventStories} />
6
+
7
+ export const Template = (args, { globals: { customConditionalToolbar } }) => {
8
+ // You can either use a function to create DOM elements or use a plain html string!
9
+ // return `<div>${label}</div>`;
10
+ let brand =
11
+ undefined !== customConditionalToolbar ? customConditionalToolbar['brands'] : 'hessenschau'
12
+ return teaser({ brand, ...args })
13
+ }
14
+
15
+ export const TemplateAlternative = (args, { globals: { customConditionalToolbar } }) => {
16
+ // You can either use a function to create DOM elements or use a plain html string!
17
+ // return `<div>${label}</div>`;
18
+ let brand =
19
+ undefined !== customConditionalToolbar ? customConditionalToolbar['brands'] : 'hessenschau'
20
+ return teaserAlternative({ brand, ...args })
21
+ }
22
+
23
+ # Standard-Teaser
24
+
25
+ ## Beschreibung
26
+
27
+ Der Standard-Teaser besteht aus 2 Hauptelemente: <b>Bild</b> und <b>Text</b> (Label, Dachzeile, Titel, Teasertext, Zusatzinformationen)
28
+
29
+ <b>Standard 33 Single Event:</b> <br />
30
+ Desktop = Text unter dem Bild <br />
31
+ Mobile = Text unter dem Bild mit Teasertext <br />
32
+
33
+ <b>Standard 33 Two Events:</b> <br />
34
+ Desktop = Text unter dem Bild <br />
35
+ Mobile = Text unter dem Bild mit Teasertext <br />
36
+
37
+ <b>Standard 33 Multiple Events:</b> <br />
38
+ Desktop = Text unter dem Bild <br />
39
+ Mobile = Text unter dem Bild mit Teasertext <br />{' '}
40
+
41
+ ## Sub-Komponenten
42
+
43
+ Die Standard-Teaser-Komponente inkludiert folgende Komponenten:
44
+
45
+ <ul>
46
+ <li>
47
+ components/teaser/components/<b>teaser\_lead</b>
48
+ </li>
49
+
50
+ {' '}
51
+ <li>
52
+ components/base/<b>link</b>
53
+ </li>
54
+
55
+ {' '}
56
+ <li>
57
+ components/teaser/components/<b>teaser\_heading</b>
58
+ </li>
59
+
60
+ {' '}
61
+ <li>
62
+ components/teaser/components/<b>teaser\_text</b>
63
+ </li>
64
+
65
+ <li>
66
+ components/teaser/components/<b>teaser\_byline</b>
67
+ </li>
68
+ </ul>
69
+
70
+ ## Verwendung
71
+
72
+ Die Standard-Teaser-Komponente wird in handlebars wie folgt eingebaut:
73
+
74
+ ```html
75
+ {{> components/teaser/teaser_standard_event}}
76
+ ```
77
+
78
+ <Canvas withToolbar>
79
+ <Story of={TeaserStandardEventStories.Standard33EinzelEvent} />
80
+
81
+ {' '}
82
+ <Story of={TeaserStandardEventStories.Standard33EinzelEventAbgesagt} />
83
+
84
+ {' '}
85
+ <Story of={TeaserStandardEventStories.Standard33ZweiEvents} />
86
+
87
+ {' '}
88
+ <Story of={TeaserStandardEventStories.Standard33MehrereEvents} />
89
+
90
+ {' '}
91
+ <Story of={TeaserStandardEventStories.Standard50EinzelEvent} />
92
+
93
+ {' '}
94
+ <Story of={TeaserStandardEventStories.Standard100EinzelEvent} />
95
+
96
+ {' '}
97
+ <Story of={TeaserStandardEventStories.Standard100ZweiEvents} />
98
+
99
+ {' '}
100
+ <Story of={TeaserStandardEventStories.Alternativ100EinzelEvent} />
101
+
102
+ <Story of={TeaserStandardEventStories.Alternativ100ZweiEvents} />
103
+ </Canvas>
@@ -0,0 +1,119 @@
1
+ import teaser from './teaser_standard.hbs'
2
+ import teaserAlternative from './teaser_alternativ.hbs'
3
+ import teaser33SingleEventSerif from './fixtures/teaser_standard_33_serif_single_event.json'
4
+ import teaser33SingleEventStatus from './fixtures/teaser_standard_33_serif_single_event_status.json'
5
+ import teaser33TwoEventsSerif from './fixtures/teaser_standard_33_serif_two_events.json'
6
+ import teaser33MultipleEventsSerif from './fixtures/teaser_standard_33_serif_multiple_events.json'
7
+ import teaser50SingleEventSerif from './fixtures/teaser_standard_50_serif_single_event.json'
8
+ import teaser100SingleEventSerif from './fixtures/teaser_standard_100_serif_single_event.json'
9
+ import teaser100TwoEventsSerif from './fixtures/teaser_standard_100_serif_two_events.json'
10
+ import teaserAlternative100SingleEventSerif from './fixtures/teaser_alternative_100_serif_single_event.json'
11
+ import teaserAlternative100TwoEventsSerif from './fixtures/teaser_alternative_100_serif_two_events.json'
12
+
13
+ const Template = (args, { globals: { customConditionalToolbar } }) => {
14
+ // You can either use a function to create DOM elements or use a plain html string!
15
+ // return `<div>${label}</div>`;
16
+ let brand =
17
+ undefined !== customConditionalToolbar ? customConditionalToolbar['brands'] : 'hessenschau'
18
+ return teaser({ brand, ...args })
19
+ }
20
+
21
+ const TemplateAlternative = (args, { globals: { customConditionalToolbar } }) => {
22
+ // You can either use a function to create DOM elements or use a plain html string!
23
+ // return `<div>${label}</div>`;
24
+ let brand =
25
+ undefined !== customConditionalToolbar ? customConditionalToolbar['brands'] : 'hessenschau'
26
+ return teaserAlternative({ brand, ...args })
27
+ }
28
+
29
+ export default {
30
+ title: 'Komponenten/Teaser/Event',
31
+
32
+ parameters: {
33
+ layout: 'fullscreen',
34
+
35
+ chromatic: {
36
+ viewports: [360, 1024],
37
+ diffThreshold: 0.5,
38
+ },
39
+ },
40
+
41
+ argTypes: {
42
+ teaserSize: {
43
+ control: {
44
+ type: 'select',
45
+ options: ['33', '50', '100'],
46
+ },
47
+
48
+ description: 'Teaser Größe',
49
+
50
+ table: {
51
+ defaultValue: {
52
+ summary: 'hero',
53
+ },
54
+ },
55
+ },
56
+ },
57
+
58
+ decorators: [
59
+ (Story) => {
60
+ 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">
61
+ ${Story()}
62
+ </div></div>`
63
+ },
64
+ ],
65
+ }
66
+
67
+ export const Standard33EinzelEvent = {
68
+ render: Template.bind({}),
69
+ name: 'Standard 33 Einzel-Event',
70
+ args: teaser33SingleEventSerif.logicItem.includeModel,
71
+ }
72
+
73
+ export const Standard33EinzelEventAbgesagt = {
74
+ render: Template.bind({}),
75
+ name: 'Standard 33 Einzel-Event abgesagt',
76
+ args: teaser33SingleEventStatus.logicItem.includeModel,
77
+ }
78
+
79
+ export const Standard33ZweiEvents = {
80
+ render: Template.bind({}),
81
+ name: 'Standard 33 zwei Events',
82
+ args: teaser33TwoEventsSerif.logicItem.includeModel,
83
+ }
84
+
85
+ export const Standard33MehrereEvents = {
86
+ render: Template.bind({}),
87
+ name: 'Standard 33 mehrere Events',
88
+ args: teaser33MultipleEventsSerif.logicItem.includeModel,
89
+ }
90
+
91
+ export const Standard50EinzelEvent = {
92
+ render: Template.bind({}),
93
+ name: 'Standard 50 Einzel-Event',
94
+ args: teaser50SingleEventSerif.logicItem.includeModel,
95
+ }
96
+
97
+ export const Standard100EinzelEvent = {
98
+ render: Template.bind({}),
99
+ name: 'Standard 100 Einzel-Event',
100
+ args: teaser100SingleEventSerif.logicItem.includeModel,
101
+ }
102
+
103
+ export const Standard100ZweiEvents = {
104
+ render: Template.bind({}),
105
+ name: 'Standard 100 zwei Events',
106
+ args: teaser100TwoEventsSerif.logicItem.includeModel,
107
+ }
108
+
109
+ export const Alternativ100EinzelEvent = {
110
+ render: TemplateAlternative.bind({}),
111
+ name: 'Alternativ 100 Einzel-Event',
112
+ args: teaserAlternative100SingleEventSerif.logicItem.includeModel,
113
+ }
114
+
115
+ export const Alternativ100ZweiEvents = {
116
+ render: TemplateAlternative.bind({}),
117
+ name: 'Alternativ 100 zwei Events',
118
+ args: teaserAlternative100TwoEventsSerif.logicItem.includeModel,
119
+ }
@@ -0,0 +1,10 @@
1
+ import { ArgsTable, Meta, Story, Canvas } from '@storybook/blocks'
2
+ import * as TeaserTickerStories from './teaser_ticker.stories'
3
+
4
+ import ticker from './teaser_ticker.hbs'
5
+
6
+ <Meta of={TeaserTickerStories} />
7
+
8
+ <Canvas withToolbar>
9
+ <Story of={TeaserTickerStories.TickerTeaser100} />
10
+ </Canvas>
@@ -1,33 +1,34 @@
1
- import { ArgsTable, Meta, Story, Canvas, Preview } from '@storybook/addon-docs'
2
-
3
1
  import ticker from './teaser_ticker.hbs'
4
2
  import tickerTeaser100Standard from '../fixtures/ticker_teaser_standard_100.json'
5
3
 
6
- <Meta
7
- title="Komponenten/Teaser/Ticker"
8
- parameters={{
9
- layout: '',
10
- }}
11
- argTypes={{}}
12
- decorators={[
13
- (Story) => {
14
- 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">
15
- ${Story()}
16
- </div></div>`
17
- },
18
- ]}
19
- />
20
-
21
- export const Template = (args, { globals: { customConditionalToolbar } }) => {
4
+ const Template = (args, { globals: { customConditionalToolbar } }) => {
22
5
  // You can either use a function to create DOM elements or use a plain html string!
23
6
  // return `<div>${label}</div>`;
24
- let brand =
7
+ let brand =
25
8
  undefined !== customConditionalToolbar ? customConditionalToolbar['brands'] : 'hessenschau'
26
9
  return ticker({ brand, ...args })
27
10
  }
28
11
 
29
- <Preview withToolbar>
30
- <Story name="Ticker Teaser 100" args={tickerTeaser100Standard.logicItem.includeModel} >
31
- {Template.bind({})}
32
- </Story>
33
- </Preview>
12
+ export default {
13
+ title: 'Komponenten/Teaser/Ticker',
14
+
15
+ parameters: {
16
+ layout: '',
17
+ },
18
+
19
+ argTypes: {},
20
+
21
+ decorators: [
22
+ (Story) => {
23
+ 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">
24
+ ${Story()}
25
+ </div></div>`
26
+ },
27
+ ],
28
+ }
29
+
30
+ export const TickerTeaser100 = {
31
+ render: Template.bind({}),
32
+ name: 'Ticker Teaser 100',
33
+ args: tickerTeaser100Standard.logicItem.includeModel,
34
+ }
@@ -1,12 +0,0 @@
1
- /** helper to get the active set options id */
2
- const getActiveValue = ({ globals, parameters }) => {
3
- const global = globals.customConditionalToolbar || {}
4
- const param = parameters.customConditionalToolbar
5
- return undefined !== global[param.default] ? global[param.default] : 'hessenschau' // get the selected options id
6
- }
7
-
8
- export const withThemeDecorator = (StoryFn, context) => {
9
- return `<div id="theming" class="max-w-full" data-theme="${getActiveValue(context)}">
10
- ${StoryFn()}
11
- </div>`
12
- }
@@ -1,39 +0,0 @@
1
- import { Meta, ColorPalette, ColorItem } from '@storybook/addon-docs'
2
- const tailwindConfig = require('../../tailwind.config')
3
- const colorVariables = Object.entries(tailwindConfig.theme.extend.colors).filter(
4
- ([key, value]) => typeof value === 'string' && value.match(/^var/)
5
- )
6
- let brands = ['hr','hessenschau','hr1','hr2','hr3','hr4','you-fm','hr-inforadio','hr-fernsehen','hr-rundfunkrat','hr-werbung','hr-bigband','hr-sinfonieorchester']
7
- let shortcuts = ['hr','hs','hr1','hr2','hr3','hr4','youfm','hrInfo','hr-FS','hr-RR','hr-W','hr-BB','hr-SO']
8
- let colorsMap = {}
9
- colorVariables.forEach(([key, value]) => {
10
- let colors = []
11
- colors.push(value)
12
- colorsMap[key] = colors
13
- })
14
-
15
- <Meta title="Grundlegendes/Farben/Markenfarben" />
16
-
17
- <h1>Markenfarben</h1>
18
- <br/>
19
- <ColorPalette>
20
- {Object.entries(colorsMap).map((token, index) => {
21
- let colorsMapBrands = {}
22
- for (let i = 0; i < brands.length; i++) {
23
- let ele = document.querySelector(':root');
24
- ele.setAttribute('data-theme', brands[i])
25
- let cs = getComputedStyle(ele);
26
- let cv = token[1].toString()
27
- let p = cv.substring(4, cv.length-1)
28
- if(p.indexOf(',') > -1) {p = p.substring(0, p.indexOf(','))}
29
- let hexColor = cs.getPropertyValue(p)
30
- colorsMapBrands[shortcuts[i]] = hexColor
31
- }
32
- return (
33
- <ColorItem
34
- title={token[0]}
35
- colors={colorsMapBrands}
36
- />
37
- )
38
- })}
39
- </ColorPalette>
@@ -1,93 +0,0 @@
1
- import { ArgsTable, Meta, Story, Canvas, Preview } from '@storybook/addon-docs'
2
- import { resetComponents } from '@storybook/components'
3
- import icon from './views/components/base/image/icon.hbs'
4
-
5
- import example from './example.hbs'
6
-
7
- <Meta
8
- title="Grundlegendes/Template/Beispiel-Story"
9
- argTypes={{
10
- label: {
11
- control: 'text',
12
- description: 'Button text',
13
- },
14
- size: {
15
- control: { type: 'select', options: ['sm', 'md', 'lg', 'xl'] },
16
- description: 'Größe des Buttons',
17
- table: {
18
- defaultValue: {
19
- summary: 'md',
20
- },
21
- },
22
- },
23
- type: {
24
- description: 'Typ des Buttons',
25
- control: {
26
- type: 'select',
27
- options: ['primary', 'secondary'],
28
- },
29
- table: {
30
- defaultValue: {
31
- summary: 'primary',
32
- },
33
- },
34
- },
35
- }}
36
- />
37
-
38
- export const Template = ({ label, ...args }) => {
39
- // You can either use a function to create DOM elements or use a plain html string!
40
- // return `<div>${label}</div>`;
41
- return example({ label, ...args })
42
- }
43
-
44
- # Name der Komponente
45
-
46
- ## Beschreibung/Abstract
47
-
48
- Kurzer Beschreibungstext der die Komponente erklärt -> Penis
49
-
50
- <Preview withToolbar>
51
- <Story
52
- name="Primary"
53
- args={{
54
- label: 'Button',
55
- }}
56
- >
57
- {Template.bind({})}
58
- </Story>
59
- </Preview>
60
-
61
- ## Props
62
-
63
- Beschreibung der wichtigsten parameter, die für die Komponente benötigt werden
64
-
65
- <ArgsTable story="Primary" />
66
-
67
- ## Usage/Verwendung
68
-
69
- ggf. Beschreibung wann und wie die Komponente eingesetzt wird in handlebars
70
-
71
- ```html
72
- {{> components/teaser/components/teaser_heading fontVariant=this.headingFontVariant
73
- headlineTag=this.headlineTag label=this.label readMore=this.link.readMoreText.readMoreScreenreader
74
- size=this.teaserSize title=this.title topline=this.topline }}
75
- ```
76
-
77
- ## Dos/Doents
78
-
79
- <ComponentRules
80
- rules={[
81
- {
82
- positive: {
83
- component: <div>Get started</div>,
84
- description:
85
- 'Use 1 or 2 words, no longer than 4 words, with fewer than 20 characters including spaces.',
86
- },
87
- negative: {
88
- component: <div>Get started and enjoy discount!</div>,
89
- description: 'Don’t use punctuation marks such as periods or exclamation points.',
90
- },
91
- },
92
- ]}
93
- />