hr-design-system-handlebars 1.11.10 → 1.11.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/.babelrc.json +14 -0
  2. package/.storybook/main.js +34 -52
  3. package/.storybook/preview-head.html +4 -1
  4. package/.storybook/preview.js +25 -35
  5. package/CHANGELOG.md +29 -0
  6. package/dist/assets/index.css +11 -3
  7. package/dist/views/components/page/page_pagination.hbs +1 -1
  8. package/dist/views/components/pagination/pagination.hbs +15 -14
  9. package/dist/views/components/pagination/pagination_current_page_invalid.hbs +1 -1
  10. package/dist/views/components/pagination/pagination_current_page_valid.hbs +2 -1
  11. package/dist/views/components/pagination/pagination_more_than_three_pages.hbs +3 -3
  12. package/dist/views/components/pagination/pagination_only_three_pages.hbs +7 -7
  13. package/dist/views/components/pagination/pagination_only_two_pages.hbs +2 -2
  14. package/package.json +20 -13
  15. package/src/assets/css/custom-utilities.css +3 -3
  16. package/src/assets/fixtures/page/page_pagination.json +15 -14
  17. package/src/stories/BrandColors.data.js +42 -0
  18. package/src/stories/BrandColors.mdx +25 -0
  19. package/src/stories/{Colors.stories.mdx → Colors.data.js} +2 -18
  20. package/src/stories/Colors.mdx +19 -0
  21. package/src/stories/Example.mdx +56 -0
  22. package/src/stories/Example.stories.js +57 -0
  23. package/src/stories/{Fixtures.stories.mdx → Fixtures.mdx} +3 -5
  24. package/src/stories/{InstallAndUpdate.stories.mdx → InstallAndUpdate.mdx} +0 -2
  25. package/src/stories/Introduction.mdx +3 -0
  26. package/src/stories/{SvgOptimization.stories.mdx → SvgOptimization.mdx} +0 -2
  27. package/src/stories/{Typography.stories.mdx → Typography.mdx} +13 -14
  28. package/src/stories/{conventions-and-datastructure.stories.mdx → conventions-and-datastructure.mdx} +7 -9
  29. package/src/stories/views/components/Button.mdx +30 -0
  30. package/src/stories/views/components/Button_.stories.js +77 -0
  31. package/src/stories/views/components/event/calendar/{event_calendar_components.stories.mdx → event_calendar_components.mdx} +31 -87
  32. package/src/stories/views/components/event/calendar/event_calendar_components.stories.js +129 -0
  33. package/src/stories/views/components/geoTag/geoTag.mdx +32 -0
  34. package/src/stories/views/components/geoTag/geoTag.stories.js +35 -0
  35. package/src/stories/views/components/grid/grid.mdx +210 -0
  36. package/src/stories/views/components/grid/grid.stories.js +148 -0
  37. package/src/stories/views/components/label/label.mdx +54 -0
  38. package/src/stories/views/components/label/label.stories.js +183 -0
  39. package/src/stories/views/components/page/fixtures/page_pagination.json +1 -1
  40. package/src/stories/views/components/page/page.data.js +17 -0
  41. package/src/stories/views/components/page/page.mdx +110 -0
  42. package/src/stories/views/components/page/page.stories.js +50 -0
  43. package/src/stories/views/components/page/page_pagination.data.js +8 -0
  44. package/src/stories/views/components/page/page_pagination.hbs +1 -1
  45. package/src/stories/views/components/page/page_pagination.mdx +8 -0
  46. package/src/stories/views/components/page/page_pagination.stories.js +34 -0
  47. package/src/stories/views/components/page/page_player.mdx +21 -0
  48. package/src/stories/views/components/page/page_player.stories.js +34 -0
  49. package/src/stories/views/components/pagination/pagination.hbs +15 -14
  50. package/src/stories/views/components/pagination/pagination_current_page_invalid.hbs +1 -1
  51. package/src/stories/views/components/pagination/pagination_current_page_valid.hbs +2 -1
  52. package/src/stories/views/components/pagination/pagination_more_than_three_pages.hbs +3 -3
  53. package/src/stories/views/components/pagination/pagination_only_three_pages.hbs +7 -7
  54. package/src/stories/views/components/pagination/pagination_only_two_pages.hbs +2 -2
  55. package/src/stories/views/components/site_header/{header.stories.mdx → header.mdx} +218 -152
  56. package/src/stories/views/components/site_header/header.stories.js +62 -0
  57. package/src/stories/views/components/teaser/cluster/teaser_cluster.mdx +32 -0
  58. package/src/stories/views/components/teaser/cluster/teaser_cluster.stories.js +146 -0
  59. package/src/stories/views/components/teaser/components/teaser_byline.mdx +97 -0
  60. package/src/stories/views/components/teaser/components/teaser_byline.stories.js +30 -0
  61. package/src/stories/views/components/teaser/components/teaser_heading.mdx +96 -0
  62. package/src/stories/views/components/teaser/components/teaser_heading.stories.js +158 -0
  63. package/src/stories/views/components/teaser/components/teaser_text.mdx +36 -0
  64. package/src/stories/views/components/teaser/components/teaser_text.stories.js +74 -0
  65. package/src/stories/views/components/teaser/components/teaser_title.mdx +42 -0
  66. package/src/stories/views/components/teaser/components/teaser_title.stories.js +85 -0
  67. package/src/stories/views/components/teaser/components/teaser_topline.mdx +29 -0
  68. package/src/stories/views/components/teaser/components/teaser_topline.stories.js +27 -0
  69. package/src/stories/views/components/teaser/content_nav/teaser_content_nav.mdx +54 -0
  70. package/src/stories/views/components/teaser/content_nav/{teaser_content_nav.stories.mdx → teaser_content_nav.stories.js} +80 -61
  71. package/src/stories/views/components/teaser/group_teaser/group.mdx +18 -0
  72. package/src/stories/views/components/teaser/group_teaser/group.stories.js +85 -0
  73. package/src/stories/views/components/teaser/podcast/podcast.mdx +11 -0
  74. package/src/stories/views/components/teaser/podcast/{podcast.stories.mdx → podcast.stories.js} +50 -39
  75. package/src/stories/views/components/teaser/podcast/podcast_subscribe_button.mdx +10 -0
  76. package/src/stories/views/components/teaser/podcast/podcast_subscribe_button.stories.js +51 -0
  77. package/src/stories/views/components/teaser/tabbox/teaser_tabbox.mdx +10 -0
  78. package/src/stories/views/components/teaser/tabbox/teaser_tabbox.stories.js +40 -0
  79. package/src/stories/views/components/teaser/teaser_alternativ.mdx +76 -0
  80. package/src/stories/views/components/teaser/teaser_alternativ.stories.js +126 -0
  81. package/src/stories/views/components/teaser/teaser_alternativ_av.mdx +75 -0
  82. package/src/stories/views/components/teaser/teaser_alternativ_av.stories.js +111 -0
  83. package/src/stories/views/components/teaser/teaser_event_calendar.mdx +57 -0
  84. package/src/stories/views/components/teaser/teaser_event_calendar.stories.js +92 -0
  85. package/src/stories/views/components/teaser/teaser_indextext.mdx +35 -0
  86. package/src/stories/views/components/teaser/teaser_indextext.stories.js +85 -0
  87. package/src/stories/views/components/teaser/teaser_logic/teaser_logic.mdx +23 -0
  88. package/src/stories/views/components/teaser/teaser_logic/teaser_logic.stories.js +36 -0
  89. package/src/stories/views/components/teaser/teaser_poster.mdx +95 -0
  90. package/src/stories/views/components/teaser/teaser_poster.stories.js +67 -0
  91. package/src/stories/views/components/teaser/teaser_stage.mdx +15 -0
  92. package/src/stories/views/components/teaser/teaser_stage.stories.js +60 -0
  93. package/src/stories/views/components/teaser/teaser_standard.mdx +129 -0
  94. package/src/stories/views/components/teaser/teaser_standard.stories.js +166 -0
  95. package/src/stories/views/components/teaser/teaser_standard_av.mdx +38 -0
  96. package/src/stories/views/components/teaser/teaser_standard_av.stories.js +117 -0
  97. package/src/stories/views/components/teaser/teaser_standard_event.mdx +103 -0
  98. package/src/stories/views/components/teaser/teaser_standard_event.stories.js +119 -0
  99. package/src/stories/views/components/teaser/ticker/teaser_ticker.mdx +10 -0
  100. package/src/stories/views/components/teaser/ticker/{teaser_ticker.stories.mdx → teaser_ticker.stories.js} +25 -24
  101. package/.storybook/withThemeDecorator.js +0 -12
  102. package/src/stories/BrandColors.stories.mdx +0 -39
  103. package/src/stories/Example.stories.mdx +0 -93
  104. package/src/stories/Introduction.stories.mdx +0 -211
  105. package/src/stories/views/components/Button.stories.mdx +0 -82
  106. package/src/stories/views/components/geoTag/geoTag.stories.mdx +0 -61
  107. package/src/stories/views/components/grid/grid.stories.mdx +0 -275
  108. package/src/stories/views/components/label/label.stories.mdx +0 -200
  109. package/src/stories/views/components/page/page.stories.mdx +0 -144
  110. package/src/stories/views/components/page/page_pagination.stories.mdx +0 -36
  111. package/src/stories/views/components/page/page_player.stories.mdx +0 -43
  112. package/src/stories/views/components/teaser/cluster/teaser_cluster.stories.mdx +0 -97
  113. package/src/stories/views/components/teaser/components/teaser_byline.stories.mdx +0 -78
  114. package/src/stories/views/components/teaser/components/teaser_heading.stories.mdx +0 -219
  115. package/src/stories/views/components/teaser/components/teaser_text.stories.mdx +0 -94
  116. package/src/stories/views/components/teaser/components/teaser_title.stories.mdx +0 -124
  117. package/src/stories/views/components/teaser/components/teaser_topline.stories.mdx +0 -63
  118. package/src/stories/views/components/teaser/group_teaser/group.stories.mdx +0 -85
  119. package/src/stories/views/components/teaser/podcast/podcast_subscribe_button.stories.mdx +0 -52
  120. package/src/stories/views/components/teaser/tabbox/teaser_tabbox.stories.mdx +0 -39
  121. package/src/stories/views/components/teaser/teaser_alternativ.stories.mdx +0 -163
  122. package/src/stories/views/components/teaser/teaser_alternativ_av.stories.mdx +0 -142
  123. package/src/stories/views/components/teaser/teaser_event_calendar.stories.mdx +0 -131
  124. package/src/stories/views/components/teaser/teaser_indextext.stories.mdx +0 -111
  125. package/src/stories/views/components/teaser/teaser_logic/teaser_logic.stories.mdx +0 -39
  126. package/src/stories/views/components/teaser/teaser_poster.stories.mdx +0 -130
  127. package/src/stories/views/components/teaser/teaser_stage.stories.mdx +0 -53
  128. package/src/stories/views/components/teaser/teaser_standard.stories.mdx +0 -170
  129. package/src/stories/views/components/teaser/teaser_standard_av.stories.mdx +0 -95
  130. package/src/stories/views/components/teaser/teaser_standard_event.stories.mdx +0 -150
@@ -1,211 +0,0 @@
1
- import { Meta } from '@storybook/addon-docs'
2
- import Code from '../assets/icons/code-brackets.svg'
3
- import Colors from '../assets/icons/colors.svg'
4
- import Comments from '../assets/icons/comments.svg'
5
- import Direction from '../assets/icons/direction.svg'
6
- import Flow from '../assets/icons/flow.svg'
7
- import Plugin from '../assets/icons/plugin.svg'
8
- import Repo from '../assets/icons/repo.svg'
9
- import StackAlt from '../assets/icons/stackalt.svg'
10
-
11
- <Meta title="Einführung" />
12
-
13
- <style>{`
14
- .subheading {
15
- --mediumdark: '#999999';
16
- font-weight: 900;
17
- font-size: 13px;
18
- color: #999;
19
- letter-spacing: 6px;
20
- line-height: 24px;
21
- text-transform: uppercase;
22
- margin-bottom: 12px;
23
- margin-top: 40px;
24
- }
25
-
26
- .link-list {
27
- display: grid;
28
- grid-template-columns: 1fr;
29
- grid-template-rows: 1fr 1fr;
30
- row-gap: 10px;
31
- }
32
-
33
- @media (min-width: 620px) {
34
- .link-list {
35
- row-gap: 20px;
36
- column-gap: 20px;
37
- grid-template-columns: 1fr 1fr;
38
- }
39
- }
40
-
41
- @media all and (-ms-high-contrast:none) {
42
- .link-list {
43
- display: -ms-grid;
44
- -ms-grid-columns: 1fr 1fr;
45
- -ms-grid-rows: 1fr 1fr;
46
- }
47
- }
48
-
49
- .link-item {
50
- display: block;
51
- padding: 20px 30px 20px 15px;
52
- border: 1px solid #00000010;
53
- border-radius: 5px;
54
- transition: background 150ms ease-out, border 150ms ease-out, transform 150ms ease-out;
55
- color: #333333;
56
- display: flex;
57
- align-items: flex-start;
58
- }
59
-
60
- .link-item:hover {
61
- border-color: #1EA7FD50;
62
- transform: translate3d(0, -3px, 0);
63
- box-shadow: rgba(0, 0, 0, 0.08) 0 3px 10px 0;
64
- }
65
-
66
- .link-item:active {
67
- border-color: #1EA7FD;
68
- transform: translate3d(0, 0, 0);
69
- }
70
-
71
- .link-item strong {
72
- font-weight: 700;
73
- display: block;
74
- margin-bottom: 2px;
75
- }
76
-
77
- .link-item img {
78
- height: 40px;
79
- width: 40px;
80
- margin-right: 15px;
81
- flex: none;
82
- }
83
-
84
- .link-item span {
85
- font-size: 14px;
86
- line-height: 20px;
87
- }
88
-
89
- .tip {
90
- display: inline-block;
91
- border-radius: 1em;
92
- font-size: 11px;
93
- line-height: 12px;
94
- font-weight: 700;
95
- background: #E7FDD8;
96
- color: #66BF3C;
97
- padding: 4px 12px;
98
- margin-right: 10px;
99
- vertical-align: top;
100
- }
101
-
102
- .tip-wrapper {
103
- font-size: 13px;
104
- line-height: 20px;
105
- margin-top: 40px;
106
- margin-bottom: 40px;
107
- }
108
-
109
- .tip-wrapper code {
110
- font-size: 12px;
111
- display: inline-block;
112
- }
113
-
114
-
115
- `}</style>
116
-
117
- # Welcome to Storybook
118
-
119
- Storybook helps you build UI components in isolation from your app's business logic, data, and context.
120
- That makes it easy to develop hard-to-reach states. Save these UI states as **stories** to revisit during development, testing, or QA.
121
-
122
- Browse example stories now by navigating to them in the sidebar.
123
- View their code in the `src/stories` directory to learn how they work.
124
- We recommend building UIs with a [**component-driven**](https://componentdriven.org) process starting with atomic components and ending with pages.
125
-
126
- <div className="subheading">Configure</div>
127
-
128
- <div className="link-list">
129
- <a
130
- className="link-item"
131
- href="https://storybook.js.org/docs/react/addons/addon-types"
132
- target="_blank"
133
- >
134
- <img src={Plugin} alt="plugin" />
135
- <span>
136
- <strong>Presets for popular tools</strong>
137
- Easy setup for TypeScript, SCSS and more.
138
- </span>
139
- </a>
140
- <a
141
- className="link-item"
142
- href="https://storybook.js.org/docs/react/configure/webpack"
143
- target="_blank"
144
- >
145
- <img src={StackAlt} alt="Build" />
146
- <span>
147
- <strong>Build configuration</strong>
148
- How to customize webpack and Babel
149
- </span>
150
- </a>
151
- <a
152
- className="link-item"
153
- href="https://storybook.js.org/docs/react/configure/styling-and-css"
154
- target="_blank"
155
- >
156
- <img src={Colors} alt="colors" />
157
- <span>
158
- <strong>Styling</strong>
159
- How to load and configure CSS libraries
160
- </span>
161
- </a>
162
- <a
163
- className="link-item"
164
- href="https://storybook.js.org/docs/react/get-started/setup#configure-storybook-for-your-stack"
165
- target="_blank"
166
- >
167
- <img src={Flow} alt="flow" />
168
- <span>
169
- <strong>Data</strong>
170
- Providers and mocking for data libraries
171
- </span>
172
- </a>
173
- </div>
174
-
175
- <div className="subheading">Learn</div>
176
-
177
- <div className="link-list">
178
- <a className="link-item" href="https://storybook.js.org/docs" target="_blank">
179
- <img src={Repo} alt="repo" />
180
- <span>
181
- <strong>Storybook documentation</strong>
182
- Configure, customize, and extend
183
- </span>
184
- </a>
185
- <a className="link-item" href="https://www.learnstorybook.com" target="_blank">
186
- <img src={Direction} alt="direction" />
187
- <span>
188
- <strong>In-depth guides</strong>
189
- Best practices from leading teams
190
- </span>
191
- </a>
192
- <a className="link-item" href="https://github.com/storybookjs/storybook" target="_blank">
193
- <img src={Code} alt="code" />
194
- <span>
195
- <strong>GitHub project</strong>
196
- View the source and add issues
197
- </span>
198
- </a>
199
- <a className="link-item" href="https://discord.gg/UUt2PJb" target="_blank">
200
- <img src={Comments} alt="comments" />
201
- <span>
202
- <strong>Discord chat</strong>
203
- Chat with maintainers and the community
204
- </span>
205
- </a>
206
- </div>
207
-
208
- <div className="tip-wrapper">
209
- <span className="tip">Tip</span>Edit the Markdown in{' '}
210
- <code>src/stories/Introduction.stories.mdx</code>
211
- </div>
@@ -1,82 +0,0 @@
1
- import { ArgsTable, Meta, Story, Canvas, Preview } from "@storybook/addon-docs";
2
-
3
- import button from "./Button.hbs";
4
-
5
- <Meta
6
- title="Komponenten-Beispiele/MDX-Button"
7
- argTypes={{
8
- label: {
9
- control: "text",
10
- description: "Button text",
11
- },
12
- size: {
13
- control: { type: "select", options: ["sm", "md", "lg", "xl"] },
14
- description: "Größe des Buttons",
15
- table: {
16
- defaultValue: {
17
- summary: "md",
18
- },
19
- },
20
- },
21
- type: {
22
- description: "Typ des Buttons",
23
- control: {
24
- type: "select",
25
- options: ["primary", "secondary"],
26
- },
27
- table: {
28
- defaultValue: {
29
- summary: "primary",
30
- },
31
- },
32
- },
33
- }}
34
- />
35
-
36
- export const Template = ({ label, ...args }) => {
37
- // You can either use a function to create DOM elements or use a plain html string!
38
- // return `<div>${label}</div>`;
39
- return button({ label, ...args });
40
- };
41
-
42
- # Button
43
-
44
- Let's define a story for our `Button` component:
45
-
46
- <Preview withToolbar>
47
- <Story
48
- name="Primary"
49
- args={{
50
- label: "Button",
51
- }}
52
- >
53
- {Template.bind({})}
54
- </Story>
55
- </Preview>
56
-
57
- <ArgsTable story="Primary" />
58
-
59
- ## Button Secondary
60
-
61
- <Canvas>
62
- <Story
63
- name="Secondary"
64
- parameters={{
65
- docs: {
66
- source: {
67
- code: `
68
- <Button class="storybook-button storybook-button--secondary">Button</button>
69
- `,
70
- },
71
- },
72
- }}
73
- args={{
74
- label: "Button",
75
- type: "secondary",
76
- }}
77
- >
78
- {Template.bind({})}
79
- </Story>
80
- </Canvas>
81
-
82
- ## Test
@@ -1,61 +0,0 @@
1
- import {
2
- ArgsTable,
3
- Meta,
4
- Story,
5
- Canvas,
6
- Preview,
7
- ColorPalette,
8
- ColorItem,
9
- } from '@storybook/addon-docs'
10
-
11
- import geoTag from './geoTag.hbs'
12
-
13
- <Meta
14
- title="Komponenten/Ortsmarke"
15
- argTypes={{
16
- _text: {
17
- control: 'text',
18
- description: 'Beschriftung der Ortsmarke',
19
- },
20
- }}
21
- decorators={[
22
- (Story) => {
23
- return `<div class="relative py-8">
24
- ${Story()}
25
- </div>`
26
- },
27
- ]}
28
- />
29
-
30
- export const Template = ({...args }) => {
31
- // You can either use a function to create DOM elements or use a plain html string!
32
- // return `<div>${geoTag}</div>`;
33
- return geoTag({...args })
34
- }
35
-
36
- # geoTag
37
-
38
- <Preview withToolbar>
39
- <Story
40
- name="Frankfurt"
41
- args={{
42
- _text: 'Frankfurt'
43
- }}
44
- >
45
- {Template.bind({})}
46
- </Story>
47
- </Preview>
48
-
49
- ## Einbindung
50
-
51
- Die Komponente wird in Form eines Handlebar Partials eingebunden.
52
-
53
- ```html
54
- {{> components/geoTag/geoTag.hbs text="Frankfurt"}}
55
- ```
56
-
57
- Mit folgenden Parametern kann die Komponente konfiguriert werden.
58
-
59
- | Parameter | Typ | Mögliche Werte | Erläuterung |
60
- | :--------- | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------- |
61
- | **\_text** | `String` | Beliebiger Text | Die Beschriftung der Ortsmarke |
@@ -1,275 +0,0 @@
1
- import { ArgsTable, Meta, Story, Canvas, Preview } from "@storybook/addon-docs";
2
-
3
- import grid_group_100_item_100 from "./grid_group_100_item_100.hbs";
4
- import grid_group_100_item_100_with_background from "./grid_group_100_item_100_with_background.hbs";
5
- import grid_group_100_item_50 from "./grid_group_100_item_50.hbs";
6
- import grid_group_100_item_33 from "./grid_group_100_item_33.hbs";
7
- import grid_group_100_item_25 from "./grid_group_100_item_25.hbs";
8
- import grid_group_66_item_100 from "./grid_group_66_item_100.hbs";
9
- import grid_group_50_item_100 from "./grid_group_50_item_100.hbs";
10
- import grid_group_33_item_100 from "./grid_group_33_item_100.hbs";
11
- import grid_group_100_tabbed_50 from "./grid_group_100_tabbed_50.hbs";
12
- import grid_group_100_tabbed_33 from "./grid_group_100_tabbed_33.hbs";
13
- import grid_group_100_tabbed_25 from "./grid_group_100_tabbed_25.hbs";
14
-
15
-
16
- <Meta
17
- title="Komponenten/grid"
18
- argTypes={{
19
-
20
- }}
21
- />
22
-
23
- export const Template01 = ({ text, ...args }) => {
24
- // You can either use a function to create DOM elements or use a plain html string!
25
- // return `<div>${label}</div>`;
26
- return grid_group_100_item_100({ text, ...args });
27
- };
28
- export const Template02 = ({ text, ...args }) => {
29
- // You can either use a function to create DOM elements or use a plain html string!
30
- // return `<div>${label}</div>`;
31
- return grid_group_100_item_100_with_background({ text, ...args });
32
- };
33
- export const Template03 = ({ text, ...args }) => {
34
- // You can either use a function to create DOM elements or use a plain html string!
35
- // return `<div>${label}</div>`;
36
- return grid_group_100_item_50({ text, ...args });
37
- };
38
- export const Template04 = ({ text, ...args }) => {
39
- // You can either use a function to create DOM elements or use a plain html string!
40
- // return `<div>${label}</div>`;
41
- return grid_group_100_item_33({ text, ...args });
42
- };
43
- export const Template05 = ({ text, ...args }) => {
44
- // You can either use a function to create DOM elements or use a plain html string!
45
- // return `<div>${label}</div>`;
46
- return grid_group_100_item_25({ text, ...args });
47
- };
48
- export const Template06 = ({ text, ...args }) => {
49
- // You can either use a function to create DOM elements or use a plain html string!
50
- // return `<div>${label}</div>`;
51
- return grid_group_66_item_100({ text, ...args });
52
- };
53
- export const Template07 = ({ text, ...args }) => {
54
- // You can either use a function to create DOM elements or use a plain html string!
55
- // return `<div>${label}</div>`;
56
- return grid_group_50_item_100({ text, ...args });
57
- };
58
- export const Template08 = ({ text, ...args }) => {
59
- // You can either use a function to create DOM elements or use a plain html string!
60
- // return `<div>${label}</div>`;
61
- return grid_group_33_item_100({ text, ...args });
62
- };
63
- export const Template09 = ({ text, ...args }) => {
64
- // You can either use a function to create DOM elements or use a plain html string!
65
- // return `<div>${label}</div>`;
66
- return grid_group_100_tabbed_50({ text, ...args });
67
- };
68
- export const Template10 = ({ text, ...args }) => {
69
- // You can either use a function to create DOM elements or use a plain html string!
70
- // return `<div>${label}</div>`;
71
- return grid_group_100_tabbed_33({ text, ...args });
72
- };
73
- export const Template11 = ({ text, ...args }) => {
74
- // You can either use a function to create DOM elements or use a plain html string!
75
- // return `<div>${label}</div>`;
76
- return grid_group_100_tabbed_25({ text, ...args });
77
- };
78
-
79
- # Grid
80
-
81
- Das sog. "Grid" (engl.: Netz) bildet das Layout-Raster für eine Übersichtsseite und
82
- beschreibt die Einteilung einer Seite in horizontale - Zeilen - und vertikale - Spalten - Einheiten.
83
- Neben der Anordnung dr Elemente wird dabei auch explizit deren Dimensionierung vorgenommen.
84
-
85
- # Grundaufbau
86
- Um ein Grid für ein Template zu erzeugen muß zunächst das ein umschließendes Wrapper-Markup gebaut werden:
87
- ```html
88
- <div class="grid grid-page">
89
- <div class="{{> components/grid/grid_group_wrapper_classes }}">
90
- ...
91
- </div>
92
- </div>
93
- ```
94
- # Gruppe (grid-group)
95
- Im Wrapper wird eine sog. "Gruppe" erzeugt. Sie entspricht im Raster einer Zeile.
96
- Bei der Größe (_size) sind auch kleinere Werte als "100" (siehe "Grid-Aufbau invers") zulässig. Finden jedoch keinen Anwendungsfall.
97
-
98
- Zusätzlich kann der Gruppe eine Hintergrund-Farbe vergeben werden.
99
-
100
- ## Einbindung
101
- Die Komponente wird in Form eines Handlebar Partials eingebunden.
102
-
103
- ```html
104
- {{#>components/grid/grid_group _size="100"}}
105
- ```
106
- Mit folgenden Parametern kann die Komponente konfiguriert werden.
107
-
108
- | Parameter | Typ | Mögliche Werte | Erläuterung |
109
- | :--------- | :------- | :--------------------- | :----------------------------------------------- |
110
- | **\_size** | `Zahl`| Teilbare Vielfache | Entpsrechung des prozentualen Wertes (100% = 100)
111
- | **\__backgroundColor**|`Zahl`|1,2,3... | Definierte Farbwerte die der Zahl beigeordnet sind | Die Beschriftung des Labels. |
112
-
113
-
114
- # Objekt (grid-item)
115
- In einer Gruppe werden ein oder mehrerer sog. "Objekte" - Items - angelegt. Sie entsprechen im Raster einer oder mehrerer Spalten.
116
- Bei der Größe (_size) wird hier keine prozentuale Entsprechung, wie bei der Gruppe angegeben, sondern dem Tailwind-Schema 12/12 = 100%,
117
- was einer ```_size = 12``` entspricht.
118
- Um 50% (6/12) zu realisieren gibt man bei ```_size = 6``` ein usf.
119
-
120
- ## Einbindung
121
- Die Komponente wird in Form eines Handlebar Partials eingebunden.
122
-
123
- ```html
124
- {{#>components/grid/grid_item _size="6"}}
125
- ```
126
- Mit folgenden Parametern kann die Komponente konfiguriert werden.
127
-
128
- | Parameter | Typ | Mögliche Werte | Erläuterung |
129
- | :--------- | :------- | :--------------------- | :----------------------------------------------- |
130
- | **\_size** | `Zahl`| Teilbare Vielfache | Entsprechung nach Tailwind-Schema 12/12 = 100%
131
-
132
- # Anwendungsbeispiele
133
-
134
- ### Grid 100%
135
- <Preview>
136
- <Story
137
- name="Grid 100%"
138
- args={{
139
-
140
- }}
141
- >
142
- {Template01.bind({})}
143
- </Story>
144
- </Preview>
145
-
146
- ### Grid 100% mit Hintergrund
147
- <Preview>
148
- <Story
149
- name="Grid 100% mit Hintergrund"
150
- args={{
151
-
152
- }}
153
- >
154
- {Template02.bind({})}
155
- </Story>
156
- </Preview>
157
-
158
- ### Grid 50%
159
- <Preview>
160
- <Story
161
- name="Grid 50%"
162
- args={{
163
-
164
- }}
165
- >
166
- {Template03.bind({})}
167
- </Story>
168
- </Preview>
169
-
170
- ### Grid 33%
171
- <Preview>
172
- <Story
173
- name="Grid 33%"
174
- args={{
175
-
176
- }}
177
- >
178
- {Template04.bind({})}
179
- </Story>
180
- </Preview>
181
-
182
- ### Grid 25%
183
- <Preview>
184
- <Story
185
- name="Grid 25%"
186
- args={{
187
-
188
- }}
189
- >
190
- {Template05.bind({})}
191
- </Story>
192
- </Preview>
193
-
194
- ### Grid Tabbed 50%
195
- <Preview>
196
- <Story
197
- name="Grid Tabbed 50%"
198
- args={{
199
-
200
- }}
201
- >
202
- {Template09.bind({})}
203
- </Story>
204
- </Preview>
205
-
206
- ### Grid Tabbed 33%
207
- <Preview>
208
- <Story
209
- name="Grid Tabbed 33%"
210
- args={{
211
-
212
- }}
213
- >
214
- {Template10.bind({})}
215
- </Story>
216
- </Preview>
217
-
218
- ### Grid Tabbed 25%
219
- <Preview>
220
- <Story
221
- name="Grid Tabbed 25%"
222
- args={{
223
-
224
- }}
225
- >
226
- {Template11.bind({})}
227
- </Story>
228
- </Preview>
229
-
230
- # Grid Aufbau invers
231
- Reguläre spannt sich die Gruppe zu 100% auf und die Größe der Objekte sind teilbare Vielfache davon:
232
- 100 / 2 Objekte = 50 % pro Objekt oder 66% + 33,3%
233
- 100 / 3 Objekte = 33,3 % pro Objekt
234
- 100 / 4 Objekte = 25 % pro Objekt
235
- Mit inversem Aufbau ist gemeint, das die Gruppe die Größe vorgibt und die Objekte immer 100% haben:
236
- 66 % / 2 Objekte = 100 % pro Objekt
237
-
238
- ### Grid 66%
239
- <Preview>
240
- <Story
241
- name="66%"
242
- args={{
243
-
244
- }}
245
- >
246
- {Template06.bind({})}
247
- </Story>
248
- </Preview>
249
-
250
- ### Grid 50%
251
- <Preview>
252
- <Story
253
- name="50%"
254
- args={{
255
-
256
- }}
257
- >
258
- {Template07.bind({})}
259
- </Story>
260
- </Preview>
261
-
262
- ### Grid 33%
263
- <Preview>
264
- <Story
265
- name="33%"
266
- args={{
267
-
268
- }}
269
- >
270
- {Template08.bind({})}
271
- </Story>
272
- </Preview>
273
-
274
-
275
- <ArgsTable story="Grid" />