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.
- package/.babelrc.json +14 -0
- package/.storybook/main.js +34 -52
- package/.storybook/preview-head.html +4 -1
- package/.storybook/preview.js +25 -35
- package/CHANGELOG.md +17 -0
- package/dist/assets/index.css +11 -3
- package/package.json +20 -13
- package/src/assets/css/custom-utilities.css +3 -3
- package/src/stories/BrandColors.data.js +42 -0
- package/src/stories/BrandColors.mdx +25 -0
- package/src/stories/{Colors.stories.mdx → Colors.data.js} +2 -18
- package/src/stories/Colors.mdx +19 -0
- package/src/stories/Example.mdx +56 -0
- package/src/stories/Example.stories.js +57 -0
- package/src/stories/{Fixtures.stories.mdx → Fixtures.mdx} +3 -5
- package/src/stories/{InstallAndUpdate.stories.mdx → InstallAndUpdate.mdx} +0 -2
- package/src/stories/Introduction.mdx +3 -0
- package/src/stories/{SvgOptimization.stories.mdx → SvgOptimization.mdx} +0 -2
- package/src/stories/{Typography.stories.mdx → Typography.mdx} +13 -14
- package/src/stories/{conventions-and-datastructure.stories.mdx → conventions-and-datastructure.mdx} +7 -9
- package/src/stories/views/components/Button.mdx +30 -0
- package/src/stories/views/components/Button_.stories.js +77 -0
- package/src/stories/views/components/event/calendar/{event_calendar_components.stories.mdx → event_calendar_components.mdx} +31 -87
- package/src/stories/views/components/event/calendar/event_calendar_components.stories.js +129 -0
- package/src/stories/views/components/geoTag/geoTag.mdx +32 -0
- package/src/stories/views/components/geoTag/geoTag.stories.js +35 -0
- package/src/stories/views/components/grid/grid.mdx +210 -0
- package/src/stories/views/components/grid/grid.stories.js +148 -0
- package/src/stories/views/components/label/label.mdx +54 -0
- package/src/stories/views/components/label/label.stories.js +183 -0
- package/src/stories/views/components/page/page.data.js +17 -0
- package/src/stories/views/components/page/page.mdx +110 -0
- package/src/stories/views/components/page/page.stories.js +50 -0
- package/src/stories/views/components/page/page_pagination.data.js +8 -0
- package/src/stories/views/components/page/page_pagination.mdx +8 -0
- package/src/stories/views/components/page/page_pagination.stories.js +34 -0
- package/src/stories/views/components/page/page_player.mdx +21 -0
- package/src/stories/views/components/page/page_player.stories.js +34 -0
- package/src/stories/views/components/site_header/{header.stories.mdx → header.mdx} +218 -152
- package/src/stories/views/components/site_header/header.stories.js +62 -0
- package/src/stories/views/components/teaser/cluster/teaser_cluster.mdx +32 -0
- package/src/stories/views/components/teaser/cluster/teaser_cluster.stories.js +146 -0
- package/src/stories/views/components/teaser/components/teaser_byline.mdx +97 -0
- package/src/stories/views/components/teaser/components/teaser_byline.stories.js +30 -0
- package/src/stories/views/components/teaser/components/teaser_heading.mdx +96 -0
- package/src/stories/views/components/teaser/components/teaser_heading.stories.js +158 -0
- package/src/stories/views/components/teaser/components/teaser_text.mdx +36 -0
- package/src/stories/views/components/teaser/components/teaser_text.stories.js +74 -0
- package/src/stories/views/components/teaser/components/teaser_title.mdx +42 -0
- package/src/stories/views/components/teaser/components/teaser_title.stories.js +85 -0
- package/src/stories/views/components/teaser/components/teaser_topline.mdx +29 -0
- package/src/stories/views/components/teaser/components/teaser_topline.stories.js +27 -0
- package/src/stories/views/components/teaser/content_nav/teaser_content_nav.mdx +54 -0
- package/src/stories/views/components/teaser/content_nav/{teaser_content_nav.stories.mdx → teaser_content_nav.stories.js} +80 -61
- package/src/stories/views/components/teaser/group_teaser/group.mdx +18 -0
- package/src/stories/views/components/teaser/group_teaser/group.stories.js +85 -0
- package/src/stories/views/components/teaser/podcast/podcast.mdx +11 -0
- package/src/stories/views/components/teaser/podcast/{podcast.stories.mdx → podcast.stories.js} +50 -39
- package/src/stories/views/components/teaser/podcast/podcast_subscribe_button.mdx +10 -0
- package/src/stories/views/components/teaser/podcast/podcast_subscribe_button.stories.js +51 -0
- package/src/stories/views/components/teaser/tabbox/teaser_tabbox.mdx +10 -0
- package/src/stories/views/components/teaser/tabbox/teaser_tabbox.stories.js +40 -0
- package/src/stories/views/components/teaser/teaser_alternativ.mdx +76 -0
- package/src/stories/views/components/teaser/teaser_alternativ.stories.js +126 -0
- package/src/stories/views/components/teaser/teaser_alternativ_av.mdx +75 -0
- package/src/stories/views/components/teaser/teaser_alternativ_av.stories.js +111 -0
- package/src/stories/views/components/teaser/teaser_event_calendar.mdx +57 -0
- package/src/stories/views/components/teaser/teaser_event_calendar.stories.js +92 -0
- package/src/stories/views/components/teaser/teaser_indextext.mdx +35 -0
- package/src/stories/views/components/teaser/teaser_indextext.stories.js +85 -0
- package/src/stories/views/components/teaser/teaser_logic/teaser_logic.mdx +23 -0
- package/src/stories/views/components/teaser/teaser_logic/teaser_logic.stories.js +36 -0
- package/src/stories/views/components/teaser/teaser_poster.mdx +95 -0
- package/src/stories/views/components/teaser/teaser_poster.stories.js +67 -0
- package/src/stories/views/components/teaser/teaser_stage.mdx +15 -0
- package/src/stories/views/components/teaser/teaser_stage.stories.js +60 -0
- package/src/stories/views/components/teaser/teaser_standard.mdx +129 -0
- package/src/stories/views/components/teaser/teaser_standard.stories.js +166 -0
- package/src/stories/views/components/teaser/teaser_standard_av.mdx +38 -0
- package/src/stories/views/components/teaser/teaser_standard_av.stories.js +117 -0
- package/src/stories/views/components/teaser/teaser_standard_event.mdx +103 -0
- package/src/stories/views/components/teaser/teaser_standard_event.stories.js +119 -0
- package/src/stories/views/components/teaser/ticker/teaser_ticker.mdx +10 -0
- package/src/stories/views/components/teaser/ticker/{teaser_ticker.stories.mdx → teaser_ticker.stories.js} +25 -24
- package/.storybook/withThemeDecorator.js +0 -12
- package/src/stories/BrandColors.stories.mdx +0 -39
- package/src/stories/Example.stories.mdx +0 -93
- package/src/stories/Introduction.stories.mdx +0 -211
- package/src/stories/views/components/Button.stories.mdx +0 -82
- package/src/stories/views/components/geoTag/geoTag.stories.mdx +0 -61
- package/src/stories/views/components/grid/grid.stories.mdx +0 -275
- package/src/stories/views/components/label/label.stories.mdx +0 -200
- package/src/stories/views/components/page/page.stories.mdx +0 -144
- package/src/stories/views/components/page/page_pagination.stories.mdx +0 -36
- package/src/stories/views/components/page/page_player.stories.mdx +0 -43
- package/src/stories/views/components/teaser/cluster/teaser_cluster.stories.mdx +0 -97
- package/src/stories/views/components/teaser/components/teaser_byline.stories.mdx +0 -78
- package/src/stories/views/components/teaser/components/teaser_heading.stories.mdx +0 -219
- package/src/stories/views/components/teaser/components/teaser_text.stories.mdx +0 -94
- package/src/stories/views/components/teaser/components/teaser_title.stories.mdx +0 -124
- package/src/stories/views/components/teaser/components/teaser_topline.stories.mdx +0 -63
- package/src/stories/views/components/teaser/group_teaser/group.stories.mdx +0 -85
- package/src/stories/views/components/teaser/podcast/podcast_subscribe_button.stories.mdx +0 -52
- package/src/stories/views/components/teaser/tabbox/teaser_tabbox.stories.mdx +0 -39
- package/src/stories/views/components/teaser/teaser_alternativ.stories.mdx +0 -163
- package/src/stories/views/components/teaser/teaser_alternativ_av.stories.mdx +0 -142
- package/src/stories/views/components/teaser/teaser_event_calendar.stories.mdx +0 -131
- package/src/stories/views/components/teaser/teaser_indextext.stories.mdx +0 -111
- package/src/stories/views/components/teaser/teaser_logic/teaser_logic.stories.mdx +0 -39
- package/src/stories/views/components/teaser/teaser_poster.stories.mdx +0 -130
- package/src/stories/views/components/teaser/teaser_stage.stories.mdx +0 -53
- package/src/stories/views/components/teaser/teaser_standard.stories.mdx +0 -170
- package/src/stories/views/components/teaser/teaser_standard_av.stories.mdx +0 -95
- package/src/stories/views/components/teaser/teaser_standard_event.stories.mdx +0 -150
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { Meta } from '@storybook/addon-docs'
|
|
2
|
-
import { resetComponents } from '@storybook/components'
|
|
3
|
-
import icon from './views/components/base/image/icon.hbs'
|
|
1
|
+
import { Meta, Story, Canvas } from '@storybook/addon-docs'
|
|
4
2
|
|
|
5
3
|
<Meta title="Grundlegendes/Testdatenbereitstellung" />
|
|
6
4
|
|
|
@@ -485,7 +483,7 @@ export const Template = (args, { globals: { customConditionalToolbar } }) => {
|
|
|
485
483
|
|
|
486
484
|
Ein toller Einleitungstext für unsere `Teaser` Komponente:
|
|
487
485
|
|
|
488
|
-
<
|
|
486
|
+
<Canvas>
|
|
489
487
|
<Story name="Standard Hero" args={xxlTeaserSerif}>
|
|
490
488
|
{Template.bind({})}
|
|
491
489
|
</Story>
|
|
@@ -507,7 +505,7 @@ Ein toller Einleitungstext für unsere `Teaser` Komponente:
|
|
|
507
505
|
<Story name="Standard SM" args={smTeaserSerif}>
|
|
508
506
|
{Template.bind({})}
|
|
509
507
|
</Story>
|
|
510
|
-
</
|
|
508
|
+
</Canvas>
|
|
511
509
|
```
|
|
512
510
|
|
|
513
511
|
Für die unterschiedlichen Teaservarianten werden die Testdaten in Variablen importiert und den konkreten Stories über den `args` Parameter
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs'
|
|
2
|
-
import { resetComponents } from '@storybook/components'
|
|
3
2
|
|
|
4
3
|
<Meta title="Grundlegendes/Typographie" />
|
|
5
4
|
|
|
@@ -27,7 +26,7 @@ Zur Auszeichnung von Fließtexten stehen die folgenden Utility Klassen zur verf
|
|
|
27
26
|
Soll der Inhalt eines bestimmten HTML-Elements als Fließtext ausgezeichnet werden, müssen ihm die Klasse `font-copy` sowie
|
|
28
27
|
eine der Klassen `text-{size}` gegben werden.
|
|
29
28
|
|
|
30
|
-
<div className="rounded-t-xl overflow-hidden bg-gradient-to-r from-purple-50 to-purple-100 p-10">
|
|
29
|
+
<div className="sb-unstyled rounded-t-xl overflow-hidden bg-gradient-to-r from-purple-50 to-purple-100 p-10">
|
|
31
30
|
<dl className="text-violet-600">
|
|
32
31
|
<div className="flex items-start">
|
|
33
32
|
<dt className="!m-0 w-16 shrink-0 text-sm text-violet-600 text-opacity-50 font-mono leading-3">
|
|
@@ -86,22 +85,22 @@ auf der Webseite des für unser Designsystem genutzten CSS Frameworks [Tailwind.
|
|
|
86
85
|
|
|
87
86
|
Zur Auszeichnung von Überschriften stehen die folgenden Utility Klassen zur verfügung:
|
|
88
87
|
|
|
89
|
-
| Klasse | Properties
|
|
90
|
-
| :------------------ |
|
|
91
|
-
| `font-headingSerif` | `font-family: RobotoSlab, serif`
|
|
92
|
-
| `font-heading` | `font-family: RobotoCond, sans-serif`
|
|
93
|
-
| `text-lg` | `font-size: 1.125rem` <br /> `line-height: 1.5rem`
|
|
94
|
-
| `text-xl` | `font-size: 1.25rem` <br /> `line-height: 1.675rem`
|
|
95
|
-
| `text-2xl` | `font-size: 1.375rem` <br /> `line-height: 1.75rem`
|
|
96
|
-
| `text-3xl` | `font-size: 1.875rem` <br /> `line-height: 2.25rem`
|
|
97
|
-
| `text-4xl` | `font-size: 2.125rem` <br /> `line-height: 2.375rem
|
|
88
|
+
| Klasse | Properties | | Erläuterung |
|
|
89
|
+
| :------------------ | :--------------------------------------------------- | ------------------ | :---------------------------------------------------- |
|
|
90
|
+
| `font-headingSerif` | `font-family: RobotoSlab, serif` | | Setzt die Eigenschaft `font-family` |
|
|
91
|
+
| `font-heading` | `font-family: RobotoCond, sans-serif` | | Setzt die Eigenschaft `font-family` |
|
|
92
|
+
| `text-lg` | `font-size: 1.125rem` <br /> `line-height: 1.5rem` | `18px`<br />`24px` | Setzt die Eigenschaften `font-size` und `line-height` |
|
|
93
|
+
| `text-xl` | `font-size: 1.25rem` <br /> `line-height: 1.675rem` | `20px`<br />`26px` | Setzt die Eigenschaften `font-size` und `line-height` |
|
|
94
|
+
| `text-2xl` | `font-size: 1.375rem` <br /> `line-height: 1.75rem` | `22px`<br />`28px` | Setzt die Eigenschaften `font-size` und `line-height` |
|
|
95
|
+
| `text-3xl` | `font-size: 1.875rem` <br /> `line-height: 2.25rem` | `30px`<br />`36px` | Setzt die Eigenschaften `font-size` und `line-height` |
|
|
96
|
+
| `text-4xl` | `font-size: 2.125rem` <br /> `line-height: 2.375rem` | `34px`<br />`38px` | Setzt die Eigenschaften `font-size` und `line-height` |
|
|
98
97
|
|
|
99
98
|
### Verwendung RobotoSlab
|
|
100
99
|
|
|
101
100
|
Soll der Inhalt eines bestimmten HTML-Elements als **Überschrift mit Serifen** ausgezeichnet werden, müssen ihm die Klasse `font-headingSerif` sowie
|
|
102
101
|
eine der Klassen `text-{size}` gegben werden.
|
|
103
102
|
|
|
104
|
-
<div className="rounded-xl overflow-hidden bg-gradient-to-r from-purple-50 to-purple-100 p-10">
|
|
103
|
+
<div className="sb-unstyled rounded-xl overflow-hidden bg-gradient-to-r from-purple-50 to-purple-100 p-10">
|
|
105
104
|
<dl className="text-violet-600">
|
|
106
105
|
<div className="mt-6 flex items-start">
|
|
107
106
|
<dt className="!m-0 w-16 shrink-0 text-sm text-violet-600 text-opacity-50 font-mono leading-5">
|
|
@@ -159,7 +158,7 @@ eine der Klassen `text-{size}` gegben werden.
|
|
|
159
158
|
Soll der Inhalt eines bestimmten HTML-Elements als **Überschrift ohne Serifen** ausgezeichnet werden, müssen ihm die Klasse `font-heading` sowie
|
|
160
159
|
eine der Klassen `text-{size}` gegben werden.
|
|
161
160
|
|
|
162
|
-
<div className="rounded-xl overflow-hidden bg-gradient-to-r from-purple-50 to-purple-100 p-10">
|
|
161
|
+
<div className="sb-unstyled rounded-xl overflow-hidden bg-gradient-to-r from-purple-50 to-purple-100 p-10">
|
|
163
162
|
<dl className="text-violet-600">
|
|
164
163
|
<div className="mt-6 flex items-start">
|
|
165
164
|
<dt className="!m-0 w-16 shrink-0 text-sm text-violet-600 text-opacity-50 font-mono leading-5">
|
|
@@ -217,7 +216,7 @@ eine der Klassen `text-{size}` gegben werden.
|
|
|
217
216
|
Soll der Inhalt eines bestimmten HTML-Elements als **Überschrift ohne Serifen** und in **bold** ausgezeichnet werden, müssen ihm die Klasse `font-heading` und `font-bold` sowie
|
|
218
217
|
eine der Klassen `text-{size}` gegben werden.
|
|
219
218
|
|
|
220
|
-
<div className="rounded-xl overflow-hidden bg-gradient-to-r from-purple-50 to-purple-100 p-10">
|
|
219
|
+
<div className="sb-unstyled rounded-xl overflow-hidden bg-gradient-to-r from-purple-50 to-purple-100 p-10">
|
|
221
220
|
<dl className="text-violet-600">
|
|
222
221
|
<div className="mt-6 flex items-start">
|
|
223
222
|
<dt className="!m-0 w-16 shrink-0 text-sm text-violet-600 text-opacity-50 font-mono leading-5">
|
package/src/stories/{conventions-and-datastructure.stories.mdx → conventions-and-datastructure.mdx}
RENAMED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { Meta,
|
|
2
|
-
import { resetComponents } from '@storybook/components'
|
|
3
|
-
import icon from './views/components/base/image/icon.hbs'
|
|
1
|
+
import { Meta, Canvas } from '@storybook/addon-docs'
|
|
4
2
|
|
|
5
3
|
<Meta title="Grundlegendes/Konventionen und Datenstrukturen" />
|
|
6
4
|
|
|
@@ -10,7 +8,7 @@ Dieses Kapitel richtet sich vor allem an die Entwickler des Designsystems. Es er
|
|
|
10
8
|
|
|
11
9
|
## Aufbau der Datenstruktur des Designsystems
|
|
12
10
|
|
|
13
|
-
<
|
|
11
|
+
<Canvas>
|
|
14
12
|
<pre>
|
|
15
13
|
{`
|
|
16
14
|
.github/
|
|
@@ -41,7 +39,7 @@ README.md
|
|
|
41
39
|
tailwind.config.js
|
|
42
40
|
`}
|
|
43
41
|
</pre>
|
|
44
|
-
</
|
|
42
|
+
</Canvas>
|
|
45
43
|
|
|
46
44
|
Im folgenden werden kurz die Ordner, deren Inhalte und andere für das Designsystem wichtige Dateien beschrieben
|
|
47
45
|
|
|
@@ -72,7 +70,7 @@ In den Ordner `dist` werden bei einem Release verschiedene Dateien (u.a. die Tem
|
|
|
72
70
|
|
|
73
71
|
### src
|
|
74
72
|
|
|
75
|
-
<
|
|
73
|
+
<Canvas>
|
|
76
74
|
<pre>
|
|
77
75
|
{`
|
|
78
76
|
src/
|
|
@@ -90,7 +88,7 @@ src/
|
|
|
90
88
|
| | |——— pages/
|
|
91
89
|
`}
|
|
92
90
|
</pre>
|
|
93
|
-
</
|
|
91
|
+
</Canvas>
|
|
94
92
|
|
|
95
93
|
Der `src` Ordner enthält die Unterordner `assets` sowie `stories`. Im Ordner `assets` finden sich die Folgenden Ordner und Dateien
|
|
96
94
|
|
|
@@ -200,13 +198,13 @@ Die Namen von Parametern in Handlebar-Komponenten sind, anders als der Datainame
|
|
|
200
198
|
<div class="bg-red-200 !mt-4 p-4">
|
|
201
199
|
<h4 class="!text-red-900 font-bold">Falsch</h4>
|
|
202
200
|
<pre class="!bg-white !leading-8 !p-4">
|
|
203
|
-
{{#>components/base/link CssClasses="" IsAriaHidden=true
|
|
201
|
+
{{#>components/base/link CssClasses="" IsAriaHidden=true
|
|
204
202
|
</pre>
|
|
205
203
|
</div>
|
|
206
204
|
<div class="bg-green-200 !mt-4 p-4">
|
|
207
205
|
<h4 class="!text-green-900 font-bold">Korrekt</h4>
|
|
208
206
|
<pre class="!bg-white !p-4 !leading-8">
|
|
209
|
-
{{#>components/base/link cssClasses="" isAriaHidden=true
|
|
207
|
+
{{#>components/base/link cssClasses="" isAriaHidden=true
|
|
210
208
|
clickLabelPrefix2="mediaLink"}}
|
|
211
209
|
</pre>
|
|
212
210
|
</div>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ArgsTable, Meta, Story, Canvas } from '@storybook/blocks'
|
|
2
|
+
import * as ButtonStories from './Button_.stories';
|
|
3
|
+
|
|
4
|
+
import button from './Button.hbs'
|
|
5
|
+
|
|
6
|
+
<Meta of={ButtonStories} />
|
|
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 button({ label, ...args })
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
# Button
|
|
15
|
+
|
|
16
|
+
Let's define a story for our `Button` component:
|
|
17
|
+
|
|
18
|
+
<Canvas>
|
|
19
|
+
<Story of={ButtonStories.Primary} />
|
|
20
|
+
</Canvas>
|
|
21
|
+
|
|
22
|
+
<ArgsTable story="Primary" />
|
|
23
|
+
|
|
24
|
+
## Button Secondary
|
|
25
|
+
|
|
26
|
+
<Canvas>
|
|
27
|
+
<Story of={ButtonStories.Secondary} />
|
|
28
|
+
</Canvas>
|
|
29
|
+
|
|
30
|
+
## Test
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import button from './Button.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 button({ label, ...args })
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
title: 'Komponenten-Beispiele/MDX-Button',
|
|
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
|
+
}
|
|
58
|
+
|
|
59
|
+
export const Secondary = {
|
|
60
|
+
render: Template.bind({}),
|
|
61
|
+
name: 'Secondary',
|
|
62
|
+
|
|
63
|
+
parameters: {
|
|
64
|
+
docs: {
|
|
65
|
+
source: {
|
|
66
|
+
code: `
|
|
67
|
+
<Button class="storybook-button storybook-button--secondary">Button</button>
|
|
68
|
+
`,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
args: {
|
|
74
|
+
label: 'Button',
|
|
75
|
+
type: 'secondary',
|
|
76
|
+
},
|
|
77
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ArgsTable, Meta, Story, Canvas
|
|
1
|
+
import { ArgsTable, Meta, Story, Canvas } from '@storybook/blocks'
|
|
2
2
|
import eventCalendarHeading from './event_calendar_heading.hbs'
|
|
3
3
|
import eventCalendarNav from './event_calendar_nav.hbs'
|
|
4
4
|
import eventCalendarContent from './event_calendar_event_teaser.hbs'
|
|
@@ -6,20 +6,9 @@ import eventCalendarFooter from './event_calendar_footer.hbs'
|
|
|
6
6
|
import teaserEventCalendar100Serif from '../../teaser/fixtures/teaser_event_calendar_100_serif.json'
|
|
7
7
|
import eventCalendarEventTeaserData from './fixtures/event_calendar_event_teaser.json'
|
|
8
8
|
import eventCalendarFooterData from './fixtures/event_calendar_footer.json'
|
|
9
|
+
import * as EventCalendarComponentsStories from './event_calendar_components.stories';
|
|
9
10
|
|
|
10
|
-
<Meta
|
|
11
|
-
title="Komponenten/Teaser/Eventkalender/Komponenten"
|
|
12
|
-
parameters={{
|
|
13
|
-
layout: 'fullscreen',
|
|
14
|
-
}}
|
|
15
|
-
decorators={[
|
|
16
|
-
(Story) => {
|
|
17
|
-
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"><div class="col-span-12">
|
|
18
|
-
${Story()}
|
|
19
|
-
</div></div></div>`
|
|
20
|
-
},
|
|
21
|
-
]}
|
|
22
|
-
/>
|
|
11
|
+
<Meta of={EventCalendarComponentsStories} />
|
|
23
12
|
|
|
24
13
|
export const TemplateEventCalendarHeading = (args, { globals: { customConditionalToolbar } }) => {
|
|
25
14
|
// You can either use a function to create DOM elements or use a plain html string!
|
|
@@ -76,21 +65,25 @@ Mobile = Text unter dem Bild mit Teasertext <br />{' '}
|
|
|
76
65
|
Die Standard-Teaser-Komponente inkludiert folgende Komponenten:
|
|
77
66
|
|
|
78
67
|
<ul>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
</
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
68
|
+
<li>
|
|
69
|
+
components/teaser/components/<b>teaser\_lead</b>
|
|
70
|
+
</li>
|
|
71
|
+
|
|
72
|
+
<li>
|
|
73
|
+
components/base/<b>link</b>
|
|
74
|
+
</li>
|
|
75
|
+
|
|
76
|
+
<li>
|
|
77
|
+
components/teaser/components/<b>teaser\_heading</b>
|
|
78
|
+
</li>
|
|
79
|
+
|
|
80
|
+
<li>
|
|
81
|
+
components/teaser/components/<b>teaser\_text</b>
|
|
82
|
+
</li>
|
|
83
|
+
|
|
84
|
+
<li>
|
|
85
|
+
components/teaser/components/<b>teaser\_byline</b>
|
|
86
|
+
</li>
|
|
94
87
|
</ul>
|
|
95
88
|
|
|
96
89
|
## Verwendung
|
|
@@ -101,61 +94,12 @@ Die Standard-Teaser-Komponente wird in handlebars wie folgt eingebaut:
|
|
|
101
94
|
{{> components/teaser/teaser_standard_event}}
|
|
102
95
|
```
|
|
103
96
|
|
|
104
|
-
<
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
}}
|
|
117
|
-
args={{ title: 'Eventkalender' }}
|
|
118
|
-
>
|
|
119
|
-
{TemplateEventCalendarHeading.bind({})}
|
|
120
|
-
</Story>
|
|
121
|
-
<Story
|
|
122
|
-
name="Navigation"
|
|
123
|
-
args={teaserEventCalendar100Serif.logicItem.includeModel.eventCalendar.months}
|
|
124
|
-
>
|
|
125
|
-
{TemplateEventCalendarNav.bind({})}
|
|
126
|
-
</Story>
|
|
127
|
-
<Story
|
|
128
|
-
name="Inhalt"
|
|
129
|
-
argTypes={{
|
|
130
|
-
statusDescriptionForLabelShort: {
|
|
131
|
-
control: {
|
|
132
|
-
type: 'select',
|
|
133
|
-
labels: {
|
|
134
|
-
event_status_cancelled: 'Abgesagt!',
|
|
135
|
-
event_status_rescheduled: 'Verschoben!',
|
|
136
|
-
event_status_moved_online_short: 'Als Livestream',
|
|
137
|
-
event_status_gets_update: 'Wird aktualisiert!',
|
|
138
|
-
},
|
|
139
|
-
options: [
|
|
140
|
-
'event_status_cancelled',
|
|
141
|
-
'event_status_rescheduled',
|
|
142
|
-
'event_status_moved_online_short',
|
|
143
|
-
'event_status_gets_update',
|
|
144
|
-
],
|
|
145
|
-
},
|
|
146
|
-
description: 'Status des Events',
|
|
147
|
-
table: {
|
|
148
|
-
defaultValue: {
|
|
149
|
-
summary: 'event_status_cancelled',
|
|
150
|
-
},
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
}}
|
|
154
|
-
args={{ ...eventCalendarEventTeaserData, _withConcertInfo: false, _showTeaser: true }}
|
|
155
|
-
>
|
|
156
|
-
{TemplateEventCalendarContent.bind({})}
|
|
157
|
-
</Story>
|
|
158
|
-
<Story name="Footer" args={eventCalendarFooterData}>
|
|
159
|
-
{TemplateEventCalendarFooter.bind({})}
|
|
160
|
-
</Story>
|
|
161
|
-
</Preview>
|
|
97
|
+
<Canvas>
|
|
98
|
+
<Story of={EventCalendarComponentsStories.Heading} />
|
|
99
|
+
|
|
100
|
+
<Story of={EventCalendarComponentsStories.Navigation} />
|
|
101
|
+
|
|
102
|
+
<Story of={EventCalendarComponentsStories.Inhalt} />
|
|
103
|
+
|
|
104
|
+
<Story of={EventCalendarComponentsStories.Footer} />
|
|
105
|
+
</Canvas>
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import eventCalendarHeading from './event_calendar_heading.hbs'
|
|
2
|
+
import eventCalendarNav from './event_calendar_nav.hbs'
|
|
3
|
+
import eventCalendarContent from './event_calendar_event_teaser.hbs'
|
|
4
|
+
import eventCalendarFooter from './event_calendar_footer.hbs'
|
|
5
|
+
import teaserEventCalendar100Serif from '../../teaser/fixtures/teaser_event_calendar_100_serif.json'
|
|
6
|
+
import eventCalendarEventTeaserData from './fixtures/event_calendar_event_teaser.json'
|
|
7
|
+
import eventCalendarFooterData from './fixtures/event_calendar_footer.json'
|
|
8
|
+
|
|
9
|
+
const TemplateEventCalendarHeading = (args, { globals: { customConditionalToolbar } }) => {
|
|
10
|
+
// You can either use a function to create DOM elements or use a plain html string!
|
|
11
|
+
// return `<div>${label}</div>`;
|
|
12
|
+
let brand =
|
|
13
|
+
undefined !== customConditionalToolbar ? customConditionalToolbar['brands'] : 'hessenschau'
|
|
14
|
+
return eventCalendarHeading({ brand, ...args })
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const TemplateEventCalendarNav = (args, { globals: { customConditionalToolbar } }) => {
|
|
18
|
+
// You can either use a function to create DOM elements or use a plain html string!
|
|
19
|
+
// return `<div>${label}</div>`;
|
|
20
|
+
let brand =
|
|
21
|
+
undefined !== customConditionalToolbar ? customConditionalToolbar['brands'] : 'hessenschau'
|
|
22
|
+
return eventCalendarNav({ brand, ...args })
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const TemplateEventCalendarContent = (args, { globals: { customConditionalToolbar } }) => {
|
|
26
|
+
// You can either use a function to create DOM elements or use a plain html string!
|
|
27
|
+
// return `<div>${label}</div>`;
|
|
28
|
+
let brand =
|
|
29
|
+
undefined !== customConditionalToolbar ? customConditionalToolbar['brands'] : 'hessenschau'
|
|
30
|
+
return eventCalendarContent({ brand, ...args })
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const TemplateEventCalendarFooter = (args, { globals: { customConditionalToolbar } }) => {
|
|
34
|
+
// You can either use a function to create DOM elements or use a plain html string!
|
|
35
|
+
// return `<div>${label}</div>`;
|
|
36
|
+
let brand =
|
|
37
|
+
undefined !== customConditionalToolbar ? customConditionalToolbar['brands'] : 'hessenschau'
|
|
38
|
+
return eventCalendarFooter({ brand, ...args })
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export default {
|
|
42
|
+
title: 'Komponenten/Teaser/Eventkalender/Komponenten',
|
|
43
|
+
|
|
44
|
+
parameters: {
|
|
45
|
+
layout: 'fullscreen',
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
decorators: [
|
|
49
|
+
(Story) => {
|
|
50
|
+
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"><div class="col-span-12">
|
|
51
|
+
${Story()}
|
|
52
|
+
</div></div></div>`
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export const Heading = {
|
|
58
|
+
render: TemplateEventCalendarHeading.bind({}),
|
|
59
|
+
name: 'Heading',
|
|
60
|
+
|
|
61
|
+
argTypes: {
|
|
62
|
+
title: {
|
|
63
|
+
description: 'Überschrift',
|
|
64
|
+
|
|
65
|
+
table: {
|
|
66
|
+
defaultValue: {
|
|
67
|
+
summary: 'Eventkalender',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
args: {
|
|
74
|
+
title: 'Eventkalender',
|
|
75
|
+
},
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export const Navigation = {
|
|
79
|
+
render: TemplateEventCalendarNav.bind({}),
|
|
80
|
+
name: 'Navigation',
|
|
81
|
+
args: teaserEventCalendar100Serif.logicItem.includeModel.eventCalendar.months,
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export const Inhalt = {
|
|
85
|
+
render: TemplateEventCalendarContent.bind({}),
|
|
86
|
+
name: 'Inhalt',
|
|
87
|
+
|
|
88
|
+
argTypes: {
|
|
89
|
+
statusDescriptionForLabelShort: {
|
|
90
|
+
control: {
|
|
91
|
+
type: 'select',
|
|
92
|
+
|
|
93
|
+
labels: {
|
|
94
|
+
event_status_cancelled: 'Abgesagt!',
|
|
95
|
+
event_status_rescheduled: 'Verschoben!',
|
|
96
|
+
event_status_moved_online_short: 'Als Livestream',
|
|
97
|
+
event_status_gets_update: 'Wird aktualisiert!',
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
options: [
|
|
101
|
+
'event_status_cancelled',
|
|
102
|
+
'event_status_rescheduled',
|
|
103
|
+
'event_status_moved_online_short',
|
|
104
|
+
'event_status_gets_update',
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
description: 'Status des Events',
|
|
109
|
+
|
|
110
|
+
table: {
|
|
111
|
+
defaultValue: {
|
|
112
|
+
summary: 'event_status_cancelled',
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
args: {
|
|
119
|
+
...eventCalendarEventTeaserData,
|
|
120
|
+
_withConcertInfo: false,
|
|
121
|
+
_showTeaser: true,
|
|
122
|
+
},
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export const Footer = {
|
|
126
|
+
render: TemplateEventCalendarFooter.bind({}),
|
|
127
|
+
name: 'Footer',
|
|
128
|
+
args: eventCalendarFooterData,
|
|
129
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ArgsTable, Meta, Story, Canvas, ColorPalette, ColorItem } from '@storybook/blocks'
|
|
2
|
+
import * as GeoTagStories from './geoTag.stories';
|
|
3
|
+
|
|
4
|
+
import geoTag from './geoTag.hbs'
|
|
5
|
+
|
|
6
|
+
<Meta of={GeoTagStories} />
|
|
7
|
+
|
|
8
|
+
export const Template = ({ ...args }) => {
|
|
9
|
+
// You can either use a function to create DOM elements or use a plain html string!
|
|
10
|
+
// return `<div>${geoTag}</div>`;
|
|
11
|
+
return geoTag({ ...args })
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
# geoTag
|
|
15
|
+
|
|
16
|
+
<Canvas withToolbar>
|
|
17
|
+
<Story of={GeoTagStories.Frankfurt} />
|
|
18
|
+
</Canvas>
|
|
19
|
+
|
|
20
|
+
## Einbindung
|
|
21
|
+
|
|
22
|
+
Die Komponente wird in Form eines Handlebar Partials eingebunden.
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
{{> components/geoTag/geoTag.hbs text="Frankfurt"}}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Mit folgenden Parametern kann die Komponente konfiguriert werden.
|
|
29
|
+
|
|
30
|
+
| Parameter | Typ | Mögliche Werte | Erläuterung |
|
|
31
|
+
| :--------- | :------- | :-------------- | :----------------------------- |
|
|
32
|
+
| **\_text** | `String` | Beliebiger Text | Die Beschriftung der Ortsmarke |
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import geoTag from './geoTag.hbs'
|
|
2
|
+
|
|
3
|
+
const Template = ({ ...args }) => {
|
|
4
|
+
// You can either use a function to create DOM elements or use a plain html string!
|
|
5
|
+
// return `<div>${geoTag}</div>`;
|
|
6
|
+
return geoTag({ ...args })
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
title: 'Komponenten/Ortsmarke',
|
|
11
|
+
|
|
12
|
+
argTypes: {
|
|
13
|
+
_text: {
|
|
14
|
+
control: 'text',
|
|
15
|
+
description: 'Beschriftung der Ortsmarke',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
decorators: [
|
|
20
|
+
(Story) => {
|
|
21
|
+
return `<div class="relative py-8">
|
|
22
|
+
${Story()}
|
|
23
|
+
</div>`
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const Frankfurt = {
|
|
29
|
+
render: Template.bind({}),
|
|
30
|
+
name: 'Frankfurt',
|
|
31
|
+
|
|
32
|
+
args: {
|
|
33
|
+
_text: 'Frankfurt',
|
|
34
|
+
},
|
|
35
|
+
}
|