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.
- 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 +29 -0
- package/dist/assets/index.css +11 -3
- package/dist/views/components/page/page_pagination.hbs +1 -1
- package/dist/views/components/pagination/pagination.hbs +15 -14
- package/dist/views/components/pagination/pagination_current_page_invalid.hbs +1 -1
- package/dist/views/components/pagination/pagination_current_page_valid.hbs +2 -1
- package/dist/views/components/pagination/pagination_more_than_three_pages.hbs +3 -3
- package/dist/views/components/pagination/pagination_only_three_pages.hbs +7 -7
- package/dist/views/components/pagination/pagination_only_two_pages.hbs +2 -2
- package/package.json +20 -13
- package/src/assets/css/custom-utilities.css +3 -3
- package/src/assets/fixtures/page/page_pagination.json +15 -14
- 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/fixtures/page_pagination.json +1 -1
- 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.hbs +1 -1
- 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/pagination/pagination.hbs +15 -14
- package/src/stories/views/components/pagination/pagination_current_page_invalid.hbs +1 -1
- package/src/stories/views/components/pagination/pagination_current_page_valid.hbs +2 -1
- package/src/stories/views/components/pagination/pagination_more_than_three_pages.hbs +3 -3
- package/src/stories/views/components/pagination/pagination_only_three_pages.hbs +7 -7
- package/src/stories/views/components/pagination/pagination_only_two_pages.hbs +2 -2
- 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
|
@@ -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
|
|
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
|
-
|
|
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
|
+
}
|
|
@@ -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>
|