hr-design-system-handlebars 1.11.10 → 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 (114) 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 +17 -0
  6. package/dist/assets/index.css +11 -3
  7. package/package.json +20 -13
  8. package/src/assets/css/custom-utilities.css +3 -3
  9. package/src/stories/BrandColors.data.js +42 -0
  10. package/src/stories/BrandColors.mdx +25 -0
  11. package/src/stories/{Colors.stories.mdx → Colors.data.js} +2 -18
  12. package/src/stories/Colors.mdx +19 -0
  13. package/src/stories/Example.mdx +56 -0
  14. package/src/stories/Example.stories.js +57 -0
  15. package/src/stories/{Fixtures.stories.mdx → Fixtures.mdx} +3 -5
  16. package/src/stories/{InstallAndUpdate.stories.mdx → InstallAndUpdate.mdx} +0 -2
  17. package/src/stories/Introduction.mdx +3 -0
  18. package/src/stories/{SvgOptimization.stories.mdx → SvgOptimization.mdx} +0 -2
  19. package/src/stories/{Typography.stories.mdx → Typography.mdx} +13 -14
  20. package/src/stories/{conventions-and-datastructure.stories.mdx → conventions-and-datastructure.mdx} +7 -9
  21. package/src/stories/views/components/Button.mdx +30 -0
  22. package/src/stories/views/components/Button_.stories.js +77 -0
  23. package/src/stories/views/components/event/calendar/{event_calendar_components.stories.mdx → event_calendar_components.mdx} +31 -87
  24. package/src/stories/views/components/event/calendar/event_calendar_components.stories.js +129 -0
  25. package/src/stories/views/components/geoTag/geoTag.mdx +32 -0
  26. package/src/stories/views/components/geoTag/geoTag.stories.js +35 -0
  27. package/src/stories/views/components/grid/grid.mdx +210 -0
  28. package/src/stories/views/components/grid/grid.stories.js +148 -0
  29. package/src/stories/views/components/label/label.mdx +54 -0
  30. package/src/stories/views/components/label/label.stories.js +183 -0
  31. package/src/stories/views/components/page/page.data.js +17 -0
  32. package/src/stories/views/components/page/page.mdx +110 -0
  33. package/src/stories/views/components/page/page.stories.js +50 -0
  34. package/src/stories/views/components/page/page_pagination.data.js +8 -0
  35. package/src/stories/views/components/page/page_pagination.mdx +8 -0
  36. package/src/stories/views/components/page/page_pagination.stories.js +34 -0
  37. package/src/stories/views/components/page/page_player.mdx +21 -0
  38. package/src/stories/views/components/page/page_player.stories.js +34 -0
  39. package/src/stories/views/components/site_header/{header.stories.mdx → header.mdx} +218 -152
  40. package/src/stories/views/components/site_header/header.stories.js +62 -0
  41. package/src/stories/views/components/teaser/cluster/teaser_cluster.mdx +32 -0
  42. package/src/stories/views/components/teaser/cluster/teaser_cluster.stories.js +146 -0
  43. package/src/stories/views/components/teaser/components/teaser_byline.mdx +97 -0
  44. package/src/stories/views/components/teaser/components/teaser_byline.stories.js +30 -0
  45. package/src/stories/views/components/teaser/components/teaser_heading.mdx +96 -0
  46. package/src/stories/views/components/teaser/components/teaser_heading.stories.js +158 -0
  47. package/src/stories/views/components/teaser/components/teaser_text.mdx +36 -0
  48. package/src/stories/views/components/teaser/components/teaser_text.stories.js +74 -0
  49. package/src/stories/views/components/teaser/components/teaser_title.mdx +42 -0
  50. package/src/stories/views/components/teaser/components/teaser_title.stories.js +85 -0
  51. package/src/stories/views/components/teaser/components/teaser_topline.mdx +29 -0
  52. package/src/stories/views/components/teaser/components/teaser_topline.stories.js +27 -0
  53. package/src/stories/views/components/teaser/content_nav/teaser_content_nav.mdx +54 -0
  54. package/src/stories/views/components/teaser/content_nav/{teaser_content_nav.stories.mdx → teaser_content_nav.stories.js} +80 -61
  55. package/src/stories/views/components/teaser/group_teaser/group.mdx +18 -0
  56. package/src/stories/views/components/teaser/group_teaser/group.stories.js +85 -0
  57. package/src/stories/views/components/teaser/podcast/podcast.mdx +11 -0
  58. package/src/stories/views/components/teaser/podcast/{podcast.stories.mdx → podcast.stories.js} +50 -39
  59. package/src/stories/views/components/teaser/podcast/podcast_subscribe_button.mdx +10 -0
  60. package/src/stories/views/components/teaser/podcast/podcast_subscribe_button.stories.js +51 -0
  61. package/src/stories/views/components/teaser/tabbox/teaser_tabbox.mdx +10 -0
  62. package/src/stories/views/components/teaser/tabbox/teaser_tabbox.stories.js +40 -0
  63. package/src/stories/views/components/teaser/teaser_alternativ.mdx +76 -0
  64. package/src/stories/views/components/teaser/teaser_alternativ.stories.js +126 -0
  65. package/src/stories/views/components/teaser/teaser_alternativ_av.mdx +75 -0
  66. package/src/stories/views/components/teaser/teaser_alternativ_av.stories.js +111 -0
  67. package/src/stories/views/components/teaser/teaser_event_calendar.mdx +57 -0
  68. package/src/stories/views/components/teaser/teaser_event_calendar.stories.js +92 -0
  69. package/src/stories/views/components/teaser/teaser_indextext.mdx +35 -0
  70. package/src/stories/views/components/teaser/teaser_indextext.stories.js +85 -0
  71. package/src/stories/views/components/teaser/teaser_logic/teaser_logic.mdx +23 -0
  72. package/src/stories/views/components/teaser/teaser_logic/teaser_logic.stories.js +36 -0
  73. package/src/stories/views/components/teaser/teaser_poster.mdx +95 -0
  74. package/src/stories/views/components/teaser/teaser_poster.stories.js +67 -0
  75. package/src/stories/views/components/teaser/teaser_stage.mdx +15 -0
  76. package/src/stories/views/components/teaser/teaser_stage.stories.js +60 -0
  77. package/src/stories/views/components/teaser/teaser_standard.mdx +129 -0
  78. package/src/stories/views/components/teaser/teaser_standard.stories.js +166 -0
  79. package/src/stories/views/components/teaser/teaser_standard_av.mdx +38 -0
  80. package/src/stories/views/components/teaser/teaser_standard_av.stories.js +117 -0
  81. package/src/stories/views/components/teaser/teaser_standard_event.mdx +103 -0
  82. package/src/stories/views/components/teaser/teaser_standard_event.stories.js +119 -0
  83. package/src/stories/views/components/teaser/ticker/teaser_ticker.mdx +10 -0
  84. package/src/stories/views/components/teaser/ticker/{teaser_ticker.stories.mdx → teaser_ticker.stories.js} +25 -24
  85. package/.storybook/withThemeDecorator.js +0 -12
  86. package/src/stories/BrandColors.stories.mdx +0 -39
  87. package/src/stories/Example.stories.mdx +0 -93
  88. package/src/stories/Introduction.stories.mdx +0 -211
  89. package/src/stories/views/components/Button.stories.mdx +0 -82
  90. package/src/stories/views/components/geoTag/geoTag.stories.mdx +0 -61
  91. package/src/stories/views/components/grid/grid.stories.mdx +0 -275
  92. package/src/stories/views/components/label/label.stories.mdx +0 -200
  93. package/src/stories/views/components/page/page.stories.mdx +0 -144
  94. package/src/stories/views/components/page/page_pagination.stories.mdx +0 -36
  95. package/src/stories/views/components/page/page_player.stories.mdx +0 -43
  96. package/src/stories/views/components/teaser/cluster/teaser_cluster.stories.mdx +0 -97
  97. package/src/stories/views/components/teaser/components/teaser_byline.stories.mdx +0 -78
  98. package/src/stories/views/components/teaser/components/teaser_heading.stories.mdx +0 -219
  99. package/src/stories/views/components/teaser/components/teaser_text.stories.mdx +0 -94
  100. package/src/stories/views/components/teaser/components/teaser_title.stories.mdx +0 -124
  101. package/src/stories/views/components/teaser/components/teaser_topline.stories.mdx +0 -63
  102. package/src/stories/views/components/teaser/group_teaser/group.stories.mdx +0 -85
  103. package/src/stories/views/components/teaser/podcast/podcast_subscribe_button.stories.mdx +0 -52
  104. package/src/stories/views/components/teaser/tabbox/teaser_tabbox.stories.mdx +0 -39
  105. package/src/stories/views/components/teaser/teaser_alternativ.stories.mdx +0 -163
  106. package/src/stories/views/components/teaser/teaser_alternativ_av.stories.mdx +0 -142
  107. package/src/stories/views/components/teaser/teaser_event_calendar.stories.mdx +0 -131
  108. package/src/stories/views/components/teaser/teaser_indextext.stories.mdx +0 -111
  109. package/src/stories/views/components/teaser/teaser_logic/teaser_logic.stories.mdx +0 -39
  110. package/src/stories/views/components/teaser/teaser_poster.stories.mdx +0 -130
  111. package/src/stories/views/components/teaser/teaser_stage.stories.mdx +0 -53
  112. package/src/stories/views/components/teaser/teaser_standard.stories.mdx +0 -170
  113. package/src/stories/views/components/teaser/teaser_standard_av.stories.mdx +0 -95
  114. package/src/stories/views/components/teaser/teaser_standard_event.stories.mdx +0 -150
package/.babelrc.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "sourceType": "unambiguous",
3
+ "presets": [
4
+ [
5
+ "@babel/preset-env",
6
+ {
7
+ "targets": {
8
+ "chrome": 100
9
+ }
10
+ }
11
+ ]
12
+ ],
13
+ "plugins": []
14
+ }
@@ -1,29 +1,42 @@
1
+ import remarkGfm from 'remark-gfm'
1
2
  const path = require('path')
2
3
  const fs = require('fs')
3
4
  const FlatContextPlugin = require('../build/webpack/feature-loader/plugin/FlatContextPlugin')
4
-
5
- module.exports = {
5
+ const config = {
6
6
  staticDirs: ['../src/assets', '../src/assets/js'],
7
7
  stories: [
8
- '../src/stories/Introduction.stories.mdx',
9
- '../src/**/*.stories.mdx',
8
+ '../src/stories/Introduction.mdx',
9
+ '../src/**/*.mdx',
10
10
  '../src/**/*.stories.@(js|jsx|ts|tsx)',
11
11
  ],
12
12
  addons: [
13
13
  '@storybook/addon-links',
14
- '@storybook/addon-essentials',
15
14
  {
16
- name: '@storybook/addon-postcss',
15
+ name: '@storybook/addon-essentials',
16
+ options: {
17
+ docs: false,
18
+ },
19
+ },
20
+ '@storybook/addon-a11y',
21
+ {
22
+ name: '@storybook/addon-styling',
17
23
  options: {
18
- postcssLoaderOptions: {
24
+ postCss: {
19
25
  implementation: require('postcss'),
20
26
  },
21
27
  },
22
28
  },
23
- '@storybook/addon-a11y',
24
- 'storybook-conditional-toolbar-selector',
29
+ {
30
+ name: '@storybook/addon-docs',
31
+ options: {
32
+ mdxPluginOptions: {
33
+ mdxCompileOptions: {
34
+ remarkPlugins: [remarkGfm],
35
+ },
36
+ },
37
+ },
38
+ },
25
39
  ],
26
-
27
40
  webpackFinal: async (config, { configType }) => {
28
41
  // `configType` has a value of 'DEVELOPMENT' or 'PRODUCTION'
29
42
  // You can change the configuration based on that.
@@ -32,9 +45,11 @@ module.exports = {
32
45
  config.resolve.alias = {
33
46
  ...config.resolve.alias,
34
47
  scripts: path.resolve(__dirname, '../scripts'),
48
+ handlebars$: path.resolve(__dirname, '../node_modules/handlebars/dist/handlebars.js'),
35
49
  components: path.resolve(__dirname, '../src/stories/views/components'),
36
50
  base: path.resolve(__dirname, '../src/stories/views/base'),
37
51
  tailwind$: path.resolve(__dirname, '../src/assets/tailwind.css'),
52
+ tailwindConfig$: path.resolve(__dirname, '../tailwind.config.js'),
38
53
  hrQuery$: path.resolve(__dirname, '../src/stories/views/generic/hrQuery.subfeature.js'),
39
54
  initializer$: path.resolve(
40
55
  __dirname,
@@ -45,7 +60,6 @@ module.exports = {
45
60
  '../build/webpack/feature-loader/initializer/loader.js'
46
61
  ),
47
62
  }
48
-
49
63
  config.module.rules.push(
50
64
  {
51
65
  test: /\.hbs$/,
@@ -92,52 +106,12 @@ module.exports = {
92
106
  ],
93
107
  }
94
108
  )
95
-
96
109
  config.plugins.push(
97
110
  new FlatContextPlugin(
98
111
  '/feature',
99
112
  path.resolve(__dirname, '../src/stories/views/'),
100
113
  /\.feature\.js$/
101
- ),
102
- {
103
- apply: (compiler) => {
104
- compiler.hooks.afterCompile.tap('UpdateTailwindPlugin', (compilation) => {
105
- if (
106
- undefined != compilation.compiler.watchFileSystem &&
107
- Object.keys(compilation.compiler.watchFileSystem.watcher.mtimes)
108
- .length > 0
109
- ) {
110
- if (
111
- !Object.keys(
112
- compilation.compiler.watchFileSystem.watcher.mtimes
113
- ).some((value) => value.includes('tailwind.css'))
114
- ) {
115
- fs.readFile(
116
- path.resolve(__dirname, '../src/assets/tailwind.css'),
117
- 'utf8',
118
- (err, data) => {
119
- if (err) {
120
- console.error(err)
121
- return
122
- }
123
- fs.writeFile(
124
- path.resolve(__dirname, '../src/assets/tailwind.css'),
125
- data,
126
- (err) => {
127
- if (err) {
128
- console.error(err)
129
- return
130
- }
131
- //file written successfully
132
- }
133
- )
134
- }
135
- )
136
- }
137
- }
138
- })
139
- },
140
- }
114
+ )
141
115
  )
142
116
 
143
117
  config.stats = 'verbose'
@@ -145,4 +119,12 @@ module.exports = {
145
119
  // Return the altered config
146
120
  return config
147
121
  },
122
+ framework: {
123
+ name: '@storybook/html-webpack5',
124
+ options: {},
125
+ },
126
+ docs: {
127
+ autodocs: true,
128
+ },
148
129
  }
130
+ export default config
@@ -3,6 +3,9 @@
3
3
  <script defer src="https://unpkg.com/@alpine-collective/toolkit@1.0.0/dist/cdn.min.js"></script>
4
4
  <script defer src="https://unpkg.com/alpinejs@3.8.1/dist/cdn.min.js"></script>
5
5
  <script src="vendor/modernizr/modernizr.cust.js"></script>
6
+ <script src="vendor/js/header.alpine.js"></script>
6
7
  <!--to be sure hyphems work correctly lang Attribute needs to be "de"
7
8
  see: https://github.com/storybookjs/storybook/issues/11706 -->
8
- <script>document.documentElement.setAttribute('lang', 'de')</script>
9
+ <script>
10
+ document.documentElement.setAttribute('lang', 'de')
11
+ </script>
@@ -1,9 +1,9 @@
1
1
  import '!style-loader!css-loader!postcss-loader!tailwind'
2
2
  import 'tailwind'
3
+ import { withThemeByDataAttribute } from '@storybook/addon-styling'
3
4
 
4
5
  import hrDesignsystemDark from './HRDesignsystemDark'
5
6
  import hrDesignsystemLight from './HRDesignsystemLight'
6
- import { withThemeDecorator } from './withThemeDecorator'
7
7
  import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
8
8
 
9
9
  import Initializer from '../build/webpack/feature-loader/initializer/initializer'
@@ -50,10 +50,10 @@ document.addEventListener('DOMContentLoaded', function (event) {
50
50
  }
51
51
  })
52
52
 
53
- if (process.env.NODE_ENV !== 'production') {
53
+ /*if (process.env.NODE_ENV !== 'production') {
54
54
  console.log(Initializer)
55
55
  console.log('Looks like we are in development mode!')
56
- }
56
+ }*/
57
57
 
58
58
  const customViewports = {
59
59
  hrMin: {
@@ -145,42 +145,12 @@ export const parameters = {
145
145
  // Storybook a11y addon configuration
146
146
  a11y: {
147
147
  // the target DOM element
148
- element: '#root',
148
+ element: '#storybook-root',
149
149
  // sets the execution mode for the addon
150
150
  manual: false,
151
151
  },
152
152
  actions: { argTypesRegex: '^on[A-Z].*' },
153
153
  controls: { expanded: true },
154
- customConditionalToolbar: {
155
- /** Defines the possible sets that can be shown */
156
- sets: [
157
- {
158
- id: 'brands',
159
- options: [
160
- { id: 'hr', title: 'hr.de' },
161
- { id: 'hessenschau', title: 'hessenschau.de' },
162
- { id: 'hr1', title: 'hr1.de' },
163
- { id: 'hr2', title: 'hr2.de' },
164
- { id: 'hr3', title: 'hr3.de' },
165
- { id: 'hr4', title: 'hr4.de' },
166
- { id: 'you-fm', title: 'you-fm.de' },
167
- { id: 'hr-inforadio', title: 'hr-info.de' },
168
- { id: 'hr-fernsehen', title: 'hr-fernsehen.de' },
169
- { id: 'hr-rundfunkrat', title: 'hr-rundfunkrat.de' },
170
- { id: 'hr-werbung', title: 'hr-werbung.de' },
171
- { id: 'hr-bigband', title: 'hr-bigband.de' },
172
- { id: 'hr-sinfonieorchester', title: 'hr-sinfonieorchester.de' },
173
- ],
174
- },
175
- ],
176
- default: 'brands',
177
- /** Icon to use in toolbar, defaults to `switchalt`. All possible icons here: https://storybookjs.netlify.app/official-storybook/?path=/story/basics-icon--labels */
178
- icon: 'globe',
179
- /** title when hovering over the icon */
180
- title: 'Themes',
181
- /** Setting disable to true makes the addon disabled by default */
182
- // disable: true,
183
- },
184
154
  docs: {
185
155
  theme: hrDesignsystemLight,
186
156
  },
@@ -203,4 +173,24 @@ export const parameters = {
203
173
  },
204
174
  }
205
175
 
206
- export const decorators = [withThemeDecorator]
176
+ export const decorators = [
177
+ withThemeByDataAttribute({
178
+ themes: {
179
+ 'hessenschau': 'hessenschau',
180
+ 'hr': 'hr',
181
+ 'hr1': 'hr1',
182
+ 'hr2': 'hr2',
183
+ 'hr3': 'hr3',
184
+ 'hr4': 'hr4',
185
+ 'you-fm': 'you-fm',
186
+ 'hr-inforadio': 'hr-inforadio',
187
+ 'hr-fernsehen': 'hr-fernsehen',
188
+ 'hr-bigband': 'hr-bigband',
189
+ 'hr-sinfonieorchester': 'hr-sinfonieorchester',
190
+ 'hr-werbung': 'hr-werbung',
191
+ 'hr-rundfunkrat': 'hr-rundfunkrat',
192
+ },
193
+ defaultTheme: 'hessenschau',
194
+ attributeName: 'data-theme',
195
+ }),
196
+ ]
package/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ # v1.11.11 (Tue Apr 18 2023)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - DPE-2270 - pfeil fehlt in der navigation bei aktiven menüpunkt [#607](https://github.com/mumprod/hr-design-system-handlebars/pull/607) ([@vascoeduardo](https://github.com/vascoeduardo))
6
+
7
+ #### 🏠 Internal
8
+
9
+ - Chore/dpe 2265 [#606](https://github.com/mumprod/hr-design-system-handlebars/pull/606) ([@szuelch](https://github.com/szuelch))
10
+
11
+ #### Authors: 2
12
+
13
+ - [@szuelch](https://github.com/szuelch)
14
+ - Vasco ([@vascoeduardo](https://github.com/vascoeduardo))
15
+
16
+ ---
17
+
1
18
  # v1.11.10 (Mon Apr 17 2023)
2
19
 
3
20
  #### 🐛 Bug Fix
@@ -2679,7 +2679,7 @@ video {
2679
2679
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
2680
2680
  }
2681
2681
  .counter-reset {
2682
- counter-reset: cnt1681728211612;
2682
+ counter-reset: cnt1681830293137;
2683
2683
  }
2684
2684
  .line-clamp-4 {
2685
2685
  overflow: hidden;
@@ -2771,6 +2771,10 @@ video {
2771
2771
  .col-full {
2772
2772
  grid-column: full;
2773
2773
  }
2774
+ .-currentBrand::before {
2775
+ --tw-content: '';
2776
+ content: var(--tw-content);
2777
+ }
2774
2778
  @media (min-width: 1024px) {
2775
2779
 
2776
2780
  .-currentBrand::before {
@@ -2802,6 +2806,8 @@ video {
2802
2806
  border-bottom-width: 8px;
2803
2807
  --tw-border-opacity: 1;
2804
2808
  border-left-color: rgba(255, 255, 255, var(--tw-border-opacity));
2809
+ --tw-content: '';
2810
+ content: var(--tw-content);
2805
2811
  border-top-color: transparent;
2806
2812
  border-bottom-color: transparent;
2807
2813
  border-left-color: #ffffff;
@@ -2838,6 +2844,8 @@ video {
2838
2844
  border-bottom-width: 7px;
2839
2845
  --tw-border-opacity: 1;
2840
2846
  border-left-color: rgba(255, 255, 255, var(--tw-border-opacity));
2847
+ --tw-content: '';
2848
+ content: var(--tw-content);
2841
2849
  border-top-color: transparent;
2842
2850
  border-bottom-color: transparent;
2843
2851
  border-left-color: #ffffff;
@@ -2909,7 +2917,7 @@ video {
2909
2917
  --tw-ring-color: rgba(255, 255, 255, 0.5);
2910
2918
  }
2911
2919
  .-ordered {
2912
- counter-increment: cnt1681728211612 1;
2920
+ counter-increment: cnt1681830293137 1;
2913
2921
  }
2914
2922
  .-ordered::before {
2915
2923
  position: absolute;
@@ -2925,7 +2933,7 @@ video {
2925
2933
  letter-spacing: .0125em;
2926
2934
  --tw-text-opacity: 1;
2927
2935
  color: rgba(0, 0, 0, var(--tw-text-opacity));
2928
- content: counter(cnt1681728211612);
2936
+ content: counter(cnt1681830293137);
2929
2937
  }
2930
2938
  /*! ****************************/
2931
2939
  /*! text-shadow */
package/package.json CHANGED
@@ -6,13 +6,13 @@
6
6
  "license": "MIT",
7
7
  "main": "dist/index.js",
8
8
  "repository": "https://github.com/szuelch/hr-design-system-handlebars",
9
- "version": "1.11.10",
9
+ "version": "1.11.11",
10
10
  "scripts": {
11
11
  "test": "echo \"Error: no test specified\" && exit 1",
12
- "storybook": "start-storybook -p 6006 public",
13
- "build-storybook": "build-storybook",
12
+ "storybook": "storybook dev -p 6006 public",
13
+ "build-storybook": "storybook build",
14
14
  "build-storybook-with-tailwind": "npm run build:tailwind && npm run build-storybook",
15
- "build-storybook-docs": "build-storybook --docs",
15
+ "build-storybook-docs": "storybook build --docs",
16
16
  "build-storybook-docs-with-tailwind": "npm run build:tailwind && npm run build-storybook-docs",
17
17
  "build:tailwind": "postcss src/assets/tailwind.css -o dist/assets/index.css",
18
18
  "build": "npm run clean && npm run build:tailwind && node ./build/scripts/build.js",
@@ -38,19 +38,23 @@
38
38
  "devDependencies": {
39
39
  "@babel/cli": "^7.13.16",
40
40
  "@babel/core": "^7.12.10",
41
- "@storybook/addon-a11y": "^6.5.9",
42
- "@storybook/addon-actions": "^6.5.9",
43
- "@storybook/addon-essentials": "^6.5.9",
44
- "@storybook/addon-links": "^6.5.9",
45
- "@storybook/addon-postcss": "^2.0.0",
46
- "@storybook/addons": "^6.5.9",
47
- "@storybook/html": "^6.5.9",
48
- "@storybook/theming": "^6.5.9",
41
+ "@babel/preset-env": "^7.21.4",
42
+ "@storybook/addon-a11y": "^7.0.5",
43
+ "@storybook/addon-actions": "^7.0.5",
44
+ "@storybook/addon-essentials": "^7.0.5",
45
+ "@storybook/addon-links": "^7.0.5",
46
+ "@storybook/addon-styling": "^1.0.1",
47
+ "@storybook/addons": "^7.0.5",
48
+ "@storybook/blocks": "7.0.5",
49
+ "@storybook/html": "^7.0.5",
50
+ "@storybook/html-webpack5": "7.0.5",
51
+ "@storybook/theming": "^7.0.5",
49
52
  "auto": "^10.26.0",
50
53
  "autoprefixer": "^10.4.2",
51
54
  "babel-loader": "^8.2.2",
52
55
  "chromatic": "^5.6.2",
53
56
  "copyfiles": "^2.4.1",
57
+ "core-js-pure": "^3.30.1",
54
58
  "cross-env": "^7.0.3",
55
59
  "fancy-log": "^2.0.0",
56
60
  "file-loader": "^6.2.0",
@@ -82,12 +86,15 @@
82
86
  "prettier": "^2.2.1",
83
87
  "raw-loader": "^4.0.2",
84
88
  "react": "^18.2.0",
89
+ "react-dom": "^18.2.0",
90
+ "remark-gfm": "^3.0.1",
85
91
  "rimraf": "^3.0.2",
86
- "storybook": "^6.5.9",
92
+ "storybook": "^7.0.5",
87
93
  "storybook-conditional-toolbar-selector": "^1.0.3",
88
94
  "tailwindcss": "^3.0.23",
89
95
  "tailwindcss-hyphens": "^0.1.0",
90
96
  "tailwindcss-important": "^1.0.0",
97
+ "typescript": "^5.0.4",
91
98
  "underscore": "^1.13.2",
92
99
  "zepto-modules": "^1.0.1"
93
100
  },
@@ -104,13 +104,13 @@
104
104
  }
105
105
 
106
106
  .-currentBrand {
107
- @apply lg:before:absolute lg:before:w-0 lg:before:h-0 lg:before:border-t-0 lg:before:border-r-8 lg:before:border-r-transparent lg:before:border-l-8 lg:before:border-l-white lg:before:border-b-8 lg:before:border-blue-congress lg:before:mt-6;
107
+ @apply before:content-[''] lg:before:absolute lg:before:w-0 lg:before:h-0 lg:before:border-t-0 lg:before:border-r-8 lg:before:border-r-transparent lg:before:border-l-8 lg:before:border-l-white lg:before:border-b-8 lg:before:border-blue-congress lg:before:mt-6;
108
108
  }
109
109
  .-currentService {
110
- @apply before:hidden lg:before:flex before:relative before:w-0 before:h-0 before:mr-4 before:mt-0 before:border-r-0 before:border-t-8 before:border-t-transparent before:border-l-8 before:border-l-white before:border-b-8 before:border-b-transparent lg:before:absolute lg:before:w-0 lg:before:h-0 lg:before:mr-0 lg:before:border-t-0 lg:before:border-r-8 lg:before:border-r-transparent lg:before:border-l-8 lg:before:border-l-transparent lg:before:border-b-8 lg:before:border-b-white lg:before:mt-12;
110
+ @apply before:content-[''] before:hidden lg:before:flex before:relative before:w-0 before:h-0 before:mr-4 before:mt-0 before:border-r-0 before:border-t-8 before:border-t-transparent before:border-l-8 before:border-l-white before:border-b-8 before:border-b-transparent lg:before:absolute lg:before:w-0 lg:before:h-0 lg:before:mr-0 lg:before:border-t-0 lg:before:border-r-8 lg:before:border-r-transparent lg:before:border-l-8 lg:before:border-l-transparent lg:before:border-b-8 lg:before:border-b-white lg:before:mt-12;
111
111
  }
112
112
  .-currentSection {
113
- @apply before:w-0 before:h-0 before:mr-2 before:-ml-4 before:border-r-0 before:border-t-7 before:border-t-transparent before:border-l-8 before:border-l-white before:border-b-7 before:border-b-transparent before:mb-0.5 lg:before:absolute lg:before:mb-0 lg:before:w-0 lg:before:h-0 lg:before:mr-0 lg:before:ml-0 lg:before:border-t-0 lg:before:border-r-8 lg:before:border-r-transparent lg:before:border-l-8 lg:before:border-l-transparent lg:before:border-b-8 lg:before:border-b-white lg:before:mt-8;
113
+ @apply before:content-[''] before:w-0 before:h-0 before:mr-2 before:-ml-4 before:border-r-0 before:border-t-7 before:border-t-transparent before:border-l-8 before:border-l-white before:border-b-7 before:border-b-transparent before:mb-0.5 lg:before:absolute lg:before:mb-0 lg:before:w-0 lg:before:h-0 lg:before:mr-0 lg:before:ml-0 lg:before:border-t-0 lg:before:border-r-8 lg:before:border-r-transparent lg:before:border-l-8 lg:before:border-l-transparent lg:before:border-b-8 lg:before:border-b-white lg:before:mt-8;
114
114
  }
115
115
  .-warnung {
116
116
  @apply text-red-600 !important;
@@ -0,0 +1,42 @@
1
+ import tailwindConfig from 'tailwindConfig'
2
+ const colorVariables = Object.entries(tailwindConfig.theme.extend.colors).filter(
3
+ ([key, value]) => typeof value === 'string' && value.match(/^var/)
4
+ )
5
+ const brands = [
6
+ 'hr',
7
+ 'hessenschau',
8
+ 'hr1',
9
+ 'hr2',
10
+ 'hr3',
11
+ 'hr4',
12
+ 'you-fm',
13
+ 'hr-inforadio',
14
+ 'hr-fernsehen',
15
+ 'hr-rundfunkrat',
16
+ 'hr-werbung',
17
+ 'hr-bigband',
18
+ 'hr-sinfonieorchester',
19
+ ]
20
+ const shortcuts = [
21
+ 'hr',
22
+ 'hs',
23
+ 'hr1',
24
+ 'hr2',
25
+ 'hr3',
26
+ 'hr4',
27
+ 'youfm',
28
+ 'hrInfo',
29
+ 'hr-FS',
30
+ 'hr-RR',
31
+ 'hr-W',
32
+ 'hr-BB',
33
+ 'hr-SO',
34
+ ]
35
+ let colorsMap = {}
36
+ colorVariables.forEach(([key, value]) => {
37
+ let colors = []
38
+ colors.push(value)
39
+ colorsMap[key] = colors
40
+ })
41
+
42
+ export { brands, shortcuts, colorsMap }
@@ -0,0 +1,25 @@
1
+ import { Meta, ColorPalette, ColorItem } from '@storybook/addon-docs'
2
+ import { colorsMap, brands, shortcuts } from './BrandColors.data.js'
3
+
4
+ <Meta title="Grundlegendes/Farben/Markenfarben" />
5
+
6
+ <h1>Markenfarben</h1>
7
+ <br />
8
+ <ColorPalette>
9
+ {Object.entries(colorsMap).map((token, index) => {
10
+ let colorsMapBrands = {}
11
+ for (let i = 0; i < brands.length; i++) {
12
+ let ele = document.querySelector(':root')
13
+ ele.setAttribute('data-theme', brands[i])
14
+ let cs = getComputedStyle(ele)
15
+ let cv = token[1].toString()
16
+ let p = cv.substring(4, cv.length - 1)
17
+ if (p.indexOf(',') > -1) {
18
+ p = p.substring(0, p.indexOf(','))
19
+ }
20
+ let hexColor = cs.getPropertyValue(p)
21
+ colorsMapBrands[shortcuts[i]] = hexColor
22
+ }
23
+ return <ColorItem title={token[0]} colors={colorsMapBrands} />
24
+ })}
25
+ </ColorPalette>
@@ -1,5 +1,4 @@
1
- import { Meta, ColorPalette, ColorItem } from '@storybook/addon-docs'
2
- const tailwindConfig = require('../../tailwind.config')
1
+ import tailwindConfig from 'tailwindConfig'
3
2
  const colorGroups = Object.entries(tailwindConfig.theme.extend.colors).filter(
4
3
  ([key, value]) => typeof value === 'object'
5
4
  )
@@ -19,19 +18,4 @@ colorGroups.forEach(([key, value]) => {
19
18
  colorsMap[key] = colors
20
19
  })
21
20
 
22
- <Meta title="Grundlegendes/Farben/Gesamtpalette" />
23
-
24
- # Colors
25
-
26
- <ColorPalette>
27
- {Object.entries(colorsMap).map((token, key) => {
28
- return (
29
- <ColorItem
30
- title={token[0]}
31
- colors={token[1].map((value) => {
32
- return value
33
- })}
34
- />
35
- )
36
- })}
37
- </ColorPalette>
21
+ export default colorsMap
@@ -0,0 +1,19 @@
1
+ import { Meta, ColorPalette, ColorItem } from '@storybook/addon-docs'
2
+ import colorsMap from './Colors.data.js'
3
+
4
+ <Meta title="Grundlegendes/Farben/Gesamtpalette" />
5
+
6
+ # Colors
7
+
8
+ <ColorPalette>
9
+ {Object.entries(colorsMap).map((token, key) => {
10
+ return (
11
+ <ColorItem
12
+ title={token[0]}
13
+ colors={token[1].map((value) => {
14
+ return value
15
+ })}
16
+ />
17
+ )
18
+ })}
19
+ </ColorPalette>
@@ -0,0 +1,56 @@
1
+ import { ArgsTable, Meta, Story, Canvas } from '@storybook/blocks'
2
+ import * as ExampleStories from './Example.stories';
3
+
4
+ import example from './example.hbs'
5
+
6
+ <Meta of={ExampleStories} />
7
+
8
+ export const Template = ({ label, ...args }) => {
9
+ // You can either use a function to create DOM elements or use a plain html string!
10
+ // return `<div>${label}</div>`;
11
+ return example({ label, ...args })
12
+ }
13
+
14
+ # Name der Komponente
15
+
16
+ ## Beschreibung/Abstract
17
+
18
+ Kurzer Beschreibungstext der die Komponente erklärt -> Penis
19
+
20
+ <Canvas withToolbar>
21
+ <Story of={ExampleStories.Primary} />
22
+ </Canvas>
23
+
24
+ ## Props
25
+
26
+ Beschreibung der wichtigsten parameter, die für die Komponente benötigt werden
27
+
28
+ <ArgsTable story="Primary" />
29
+
30
+ ## Usage/Verwendung
31
+
32
+ ggf. Beschreibung wann und wie die Komponente eingesetzt wird in handlebars
33
+
34
+ ```html
35
+ {{> components/teaser/components/teaser_heading fontVariant=this.headingFontVariant
36
+ headlineTag=this.headlineTag label=this.label readMore=this.link.readMoreText.readMoreScreenreader
37
+ size=this.teaserSize title=this.title topline=this.topline }}
38
+ ```
39
+
40
+ ## Dos/Doents
41
+
42
+ <ComponentRules
43
+ rules={[
44
+ {
45
+ positive: {
46
+ component: <div>Get started</div>,
47
+ description:
48
+ 'Use 1 or 2 words, no longer than 4 words, with fewer than 20 characters including spaces.',
49
+ },
50
+ negative: {
51
+ component: <div>Get started and enjoy discount!</div>,
52
+ description: 'Don’t use punctuation marks such as periods or exclamation points.',
53
+ },
54
+ },
55
+ ]}
56
+ />
@@ -0,0 +1,57 @@
1
+ import example from './example.hbs'
2
+
3
+ const Template = ({ label, ...args }) => {
4
+ // You can either use a function to create DOM elements or use a plain html string!
5
+ // return `<div>${label}</div>`;
6
+ return example({ label, ...args })
7
+ }
8
+
9
+ export default {
10
+ title: 'Grundlegendes/Template/Beispiel-Story',
11
+
12
+ argTypes: {
13
+ label: {
14
+ control: 'text',
15
+ description: 'Button text',
16
+ },
17
+
18
+ size: {
19
+ control: {
20
+ type: 'select',
21
+ options: ['sm', 'md', 'lg', 'xl'],
22
+ },
23
+
24
+ description: 'Größe des Buttons',
25
+
26
+ table: {
27
+ defaultValue: {
28
+ summary: 'md',
29
+ },
30
+ },
31
+ },
32
+
33
+ type: {
34
+ description: 'Typ des Buttons',
35
+
36
+ control: {
37
+ type: 'select',
38
+ options: ['primary', 'secondary'],
39
+ },
40
+
41
+ table: {
42
+ defaultValue: {
43
+ summary: 'primary',
44
+ },
45
+ },
46
+ },
47
+ },
48
+ }
49
+
50
+ export const Primary = {
51
+ render: Template.bind({}),
52
+ name: 'Primary',
53
+
54
+ args: {
55
+ label: 'Button',
56
+ },
57
+ }