hr-design-system-handlebars 1.23.3 → 1.24.0

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 (24) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/assets/index.css +46 -3
  3. package/dist/views/components/base/load_dynamic.hbs +3 -0
  4. package/dist/views/components/navigation/breadcrumb/breadcrumb.hbs +14 -0
  5. package/dist/views/components/navigation/breadcrumb/breadcrumb_items.ssi.hbs +8 -0
  6. package/dist/views/components/navigation/breadcrumb/utils/breadcrumb_link_classes.hbs +1 -0
  7. package/package.json +1 -1
  8. package/src/assets/css/custom-components.css +5 -0
  9. package/src/assets/fixtures/navigation/breadcrumb/breadcrumb.inc.json +15 -0
  10. package/src/assets/fixtures/navigation/breadcrumb/breadcrumb_2_level.json +15 -0
  11. package/src/assets/fixtures/navigation/breadcrumb/breadcrumb_3_level.json +19 -0
  12. package/src/assets/fixtures/navigation/breadcrumb/breadcrumb_4_level.json +23 -0
  13. package/src/assets/fixtures/navigation/breadcrumb/breadcrumb_5_level.json +27 -0
  14. package/src/assets/fixtures/navigation/breadcrumb/breadcrumb_items.inc.json +18 -0
  15. package/src/stories/views/components/base/load_dynamic.hbs +3 -0
  16. package/src/stories/views/components/navigation/breadcrumb/breadcrumb.hbs +14 -0
  17. package/src/stories/views/components/navigation/breadcrumb/breadcrumb.mdx +60 -0
  18. package/src/stories/views/components/navigation/breadcrumb/breadcrumb.stories.js +101 -0
  19. package/src/stories/views/components/navigation/breadcrumb/breadcrumb_items.ssi.hbs +8 -0
  20. package/src/stories/views/components/navigation/breadcrumb/fixtures/breadcrumb_2_level.json +1 -0
  21. package/src/stories/views/components/navigation/breadcrumb/fixtures/breadcrumb_3_level.json +1 -0
  22. package/src/stories/views/components/navigation/breadcrumb/fixtures/breadcrumb_4_level.json +1 -0
  23. package/src/stories/views/components/navigation/breadcrumb/fixtures/breadcrumb_5_level.json +1 -0
  24. package/src/stories/views/components/navigation/breadcrumb/utils/breadcrumb_link_classes.hbs +1 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # v1.24.0 (Tue May 16 2023)
2
+
3
+ #### 🚀 Enhancement
4
+
5
+ - Feature/dpe 2211 [#638](https://github.com/mumprod/hr-design-system-handlebars/pull/638) ([@szuelch](https://github.com/szuelch))
6
+
7
+ #### Authors: 1
8
+
9
+ - [@szuelch](https://github.com/szuelch)
10
+
11
+ ---
12
+
1
13
  # v1.23.3 (Mon May 15 2023)
2
14
 
3
15
  #### 🐛 Bug Fix
@@ -957,6 +957,31 @@ video {
957
957
  .ds-button-icon + .ds-button-label {
958
958
  margin-left: 0.5rem;
959
959
  }
960
+ /* -------------------------BREADCRUMB ------------------------------ */
961
+ #breadcrumb-nav.hide-last-item-below-sm li:nth-last-child(2) > .ds-icon-container {
962
+ position: absolute;
963
+ width: 1px;
964
+ height: 1px;
965
+ padding: 0;
966
+ margin: -1px;
967
+ overflow: hidden;
968
+ clip: rect(0, 0, 0, 0);
969
+ white-space: nowrap;
970
+ border-width: 0;
971
+ }
972
+ @media (min-width: 640px) {
973
+
974
+ #breadcrumb-nav.hide-last-item-below-sm li:nth-last-child(2) > .ds-icon-container {
975
+ position: static;
976
+ width: auto;
977
+ height: auto;
978
+ padding: 0;
979
+ margin: 0;
980
+ overflow: visible;
981
+ clip: auto;
982
+ white-space: normal;
983
+ }
984
+ }
960
985
  .sr-only {
961
986
  position: absolute;
962
987
  width: 1px;
@@ -1382,6 +1407,9 @@ video {
1382
1407
  .w-16 {
1383
1408
  width: 4rem;
1384
1409
  }
1410
+ .w-2 {
1411
+ width: 0.5rem;
1412
+ }
1385
1413
  .w-2\/12 {
1386
1414
  width: 16.666667%;
1387
1415
  }
@@ -2047,6 +2075,10 @@ video {
2047
2075
  fill: #797979;
2048
2076
  fill: var(--color-eventcalendar-secondary);
2049
2077
  }
2078
+ .fill-link {
2079
+ fill: #006eb7;
2080
+ fill: var(--color-link);
2081
+ }
2050
2082
  .fill-white {
2051
2083
  fill: #ffffff;
2052
2084
  }
@@ -2688,7 +2720,7 @@ video {
2688
2720
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
2689
2721
  }
2690
2722
  .counter-reset {
2691
- counter-reset: cnt1684170416504;
2723
+ counter-reset: cnt1684228799204;
2692
2724
  }
2693
2725
  .hyphens-auto {
2694
2726
  -webkit-hyphens: auto;
@@ -2930,7 +2962,7 @@ video {
2930
2962
  --tw-ring-color: rgba(255, 255, 255, 0.5);
2931
2963
  }
2932
2964
  .-ordered {
2933
- counter-increment: cnt1684170416504 1;
2965
+ counter-increment: cnt1684228799204 1;
2934
2966
  }
2935
2967
  .-ordered::before {
2936
2968
  position: absolute;
@@ -2946,7 +2978,7 @@ video {
2946
2978
  letter-spacing: .0125em;
2947
2979
  --tw-text-opacity: 1;
2948
2980
  color: rgba(0, 0, 0, var(--tw-text-opacity));
2949
- content: counter(cnt1684170416504);
2981
+ content: counter(cnt1684228799204);
2950
2982
  }
2951
2983
  /*! ****************************/
2952
2984
  /*! text-shadow */
@@ -4177,6 +4209,17 @@ video {
4177
4209
  }
4178
4210
  @media (min-width: 640px) {
4179
4211
 
4212
+ .sm\:not-sr-only {
4213
+ position: static;
4214
+ width: auto;
4215
+ height: auto;
4216
+ padding: 0;
4217
+ margin: 0;
4218
+ overflow: visible;
4219
+ clip: auto;
4220
+ white-space: normal;
4221
+ }
4222
+
4180
4223
  .sm\:static {
4181
4224
  position: static;
4182
4225
  }
@@ -41,4 +41,7 @@
41
41
  {{#case "components/teaser/ticker/teaser_ticker"}}
42
42
  {{> components/teaser/ticker/teaser_ticker}}
43
43
  {{/case}}
44
+ {{#case "components/navigation/breadcrumb/breadcrumb_items.ssi"}}
45
+ {{> components/navigation/breadcrumb/breadcrumb_items.ssi }}
46
+ {{/case}}
44
47
  {{/switch}}
@@ -0,0 +1,14 @@
1
+ <nav id="breadcrumb-nav"{{~#unless this.showBreadcrumbTitleAlways}} class="hide-last-item-below-sm"{{/unless~}}
2
+ role="navigation"
3
+ aria-label="{{loca "breadcrumb_headline"}}"
4
+ > <ul>
5
+ {{#with this.breadcrumbSsi}}
6
+ {{> components/base/loadSSI _templatePath="components/navigation/breadcrumb/breadcrumb_items.ssi"}}
7
+ {{/with}}
8
+ <li class="inline">
9
+ <h1 class="inline{{#unless this.showBreadcrumbTitleAlways}} sr-only sm:not-sr-only{{/unless}}">
10
+ <a href="{{_currentPageUrl}}" class="{{> components/navigation/breadcrumb/utils/breadcrumb_link_classes}}">{{~_currentPageTitle~}}</a>
11
+ </h1>
12
+ </li>
13
+ </ul>
14
+ </nav>
@@ -0,0 +1,8 @@
1
+ {{~#each this.breadcrumb}}
2
+ <li class="inline">
3
+ <a href="{{this.url}}" class="{{> components/navigation/breadcrumb/utils/breadcrumb_link_classes}}">
4
+ <span>{{this.title}}</span>
5
+ </a>
6
+ <span class="ds-icon-container inline-block">{{~> components/base/image/icon _icon="arrow-right" _addClass="mx-2 w-2 h-2 text-inherit fill-link" _iconmap="icons"~}}</span>
7
+ </li>
8
+ {{/each~}}
@@ -0,0 +1 @@
1
+ ds-link py-2 text-link font-copy text-xs hover:underline
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "license": "MIT",
7
7
  "main": "dist/index.js",
8
8
  "repository": "https://github.com/szuelch/hr-design-system-handlebars",
9
- "version": "1.23.3",
9
+ "version": "1.24.0",
10
10
  "scripts": {
11
11
  "test": "echo \"Error: no test specified\" && exit 1",
12
12
  "storybook": "storybook dev -p 6006 public",
@@ -281,3 +281,8 @@
281
281
  .ds-button-icon + .ds-button-label {
282
282
  @apply ml-2;
283
283
  }
284
+
285
+ /* -------------------------BREADCRUMB ------------------------------ */
286
+ #breadcrumb-nav.hide-last-item-below-sm li:nth-last-child(2) > .ds-icon-container {
287
+ @apply sr-only sm:not-sr-only;
288
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "breadcrumb": {
3
+ "breadcrumb": {
4
+ "showBreadcrumbTitleAlways": false,
5
+ "breadcrumbSsi": {
6
+ "breadcrumb": [
7
+ {
8
+ "url": "item-1",
9
+ "title": "Level 1"
10
+ }
11
+ ]
12
+ }
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "@->jsoninclude": "navigation/breadcrumb/breadcrumb.inc.json",
3
+ "@->contentpath": "breadcrumb",
4
+ "@->overrides": [
5
+ {
6
+ "@->contentpath": "breadcrumb.breadcrumbSsi.breadcrumb",
7
+ "@->value": [
8
+ {
9
+ "@->jsoninclude": "navigation/breadcrumb/breadcrumb_items.inc.json",
10
+ "@->contentpath": "level-1"
11
+ }
12
+ ]
13
+ }
14
+ ]
15
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "@->jsoninclude": "navigation/breadcrumb/breadcrumb.inc.json",
3
+ "@->contentpath": "breadcrumb",
4
+ "@->overrides": [
5
+ {
6
+ "@->contentpath": "breadcrumb.breadcrumbSsi.breadcrumb",
7
+ "@->value": [
8
+ {
9
+ "@->jsoninclude": "navigation/breadcrumb/breadcrumb_items.inc.json",
10
+ "@->contentpath": "level-1"
11
+ },
12
+ {
13
+ "url": "panorama",
14
+ "title": "Panorama"
15
+ }
16
+ ]
17
+ }
18
+ ]
19
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "@->jsoninclude": "navigation/breadcrumb/breadcrumb.inc.json",
3
+ "@->contentpath": "breadcrumb",
4
+ "@->overrides": [
5
+ {
6
+ "@->contentpath": "breadcrumb.breadcrumbSsi.breadcrumb",
7
+ "@->value": [
8
+ {
9
+ "@->jsoninclude": "navigation/breadcrumb/breadcrumb_items.inc.json",
10
+ "@->contentpath": "level-1"
11
+ },
12
+ {
13
+ "url": "sport",
14
+ "title": "Sport"
15
+ },
16
+ {
17
+ "url": "darmstadt98",
18
+ "title": "Darmstadt 98"
19
+ }
20
+ ]
21
+ }
22
+ ]
23
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "@->jsoninclude": "navigation/breadcrumb/breadcrumb.inc.json",
3
+ "@->contentpath": "breadcrumb",
4
+ "@->overrides": [
5
+ {
6
+ "@->contentpath": "breadcrumb.breadcrumbSsi.breadcrumb",
7
+ "@->value": [
8
+ {
9
+ "@->jsoninclude": "navigation/breadcrumb/breadcrumb_items.inc.json",
10
+ "@->contentpath": "level-1"
11
+ },
12
+ {
13
+ "url": "sport",
14
+ "title": "Sport"
15
+ },
16
+ {
17
+ "url": "fussball",
18
+ "title": "Fußball"
19
+ },
20
+ {
21
+ "url": "eintracht",
22
+ "title": "Eintracht Frankfurt"
23
+ }
24
+ ]
25
+ }
26
+ ]
27
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "level-1": {
3
+ "url": "item-1",
4
+ "title": "Start"
5
+ },
6
+ "level-2": {
7
+ "url": "item-2",
8
+ "title": "Level 2"
9
+ },
10
+ "level-3": {
11
+ "url": "item-3",
12
+ "title": "Level 3"
13
+ },
14
+ "level-4": {
15
+ "url": "item-4",
16
+ "title": "Level 4"
17
+ }
18
+ }
@@ -41,4 +41,7 @@
41
41
  {{#case "components/teaser/ticker/teaser_ticker"}}
42
42
  {{> components/teaser/ticker/teaser_ticker}}
43
43
  {{/case}}
44
+ {{#case "components/navigation/breadcrumb/breadcrumb_items.ssi"}}
45
+ {{> components/navigation/breadcrumb/breadcrumb_items.ssi }}
46
+ {{/case}}
44
47
  {{/switch}}
@@ -0,0 +1,14 @@
1
+ <nav id="breadcrumb-nav"{{~#unless this.showBreadcrumbTitleAlways}} class="hide-last-item-below-sm"{{/unless~}}
2
+ role="navigation"
3
+ aria-label="{{loca "breadcrumb_headline"}}"
4
+ > <ul>
5
+ {{#with this.breadcrumbSsi}}
6
+ {{> components/base/loadSSI _templatePath="components/navigation/breadcrumb/breadcrumb_items.ssi"}}
7
+ {{/with}}
8
+ <li class="inline">
9
+ <h1 class="inline{{#unless this.showBreadcrumbTitleAlways}} sr-only sm:not-sr-only{{/unless}}">
10
+ <a href="{{_currentPageUrl}}" class="{{> components/navigation/breadcrumb/utils/breadcrumb_link_classes}}">{{~_currentPageTitle~}}</a>
11
+ </h1>
12
+ </li>
13
+ </ul>
14
+ </nav>
@@ -0,0 +1,60 @@
1
+ import { ArgsTable, Meta, Story, Canvas, Preview } from '@storybook/blocks'
2
+ import * as BreadcrumbStories from './breadcrumb.stories'
3
+
4
+ <Meta of={BreadcrumbStories} />
5
+
6
+ # Breadcrumb
7
+
8
+ ## Übersicht
9
+
10
+ Die Breadcrumb Navigation wird auf jeder Seite (nur nicht auf der Homepage) unterhalb der Hauptnavigation eingebunden.
11
+ Sie zeigt den Nutzer:innen zu jeder Zeit an wo sie sich in der Struktur gerade befinden.
12
+ Die einzelnen Einträge der Breadcrumb sind verlinkt.
13
+
14
+ <Canvas>
15
+ <Story of={BreadcrumbStories.breadcrumb5Level} />
16
+ </Canvas>
17
+
18
+ ## Eigenschaften
19
+
20
+ <ArgsTable story="Breadcrumb 2 Level" />
21
+
22
+ ## Varianten
23
+
24
+ Je nach Verschachtelungstiefe kann eine Breadcrumb von zwei bis zu einer nahezu beliebigen Anzahl an Einträgen haben
25
+
26
+ ### Zwei Navigations-Ebenen
27
+
28
+ <Canvas>
29
+ <Story of={BreadcrumbStories.breadcrumb2Level} />
30
+ </Canvas>
31
+
32
+ ## Drei Navigations-Ebenen
33
+
34
+ <Canvas>
35
+ <Story of={BreadcrumbStories.breadcrumb3Level} />
36
+ </Canvas>
37
+
38
+ ## Vier Navigations-Ebenen
39
+
40
+ <Canvas>
41
+ <Story of={BreadcrumbStories.breadcrumb4Level} />
42
+ </Canvas>
43
+
44
+ ## Fünf Navigations-Ebenen
45
+
46
+ <Canvas>
47
+ <Story of={BreadcrumbStories.breadcrumb5Level} />
48
+ </Canvas>
49
+
50
+ ## Verwendung
51
+
52
+ Eine Breadcrumb wird mit der Handlebar Komponente `breadcrumb` eingebunden.
53
+
54
+ <Canvas>
55
+ <Story of={BreadcrumbStories.breadcrumb5Level} />
56
+ </Canvas>
57
+
58
+ ```handlebars
59
+ {{> components/navigation/breadcrumb/breadcrumb _currentPageUrl="URL" _currentPageTitle="Titel der aktuellen Seite"}}
60
+ ```
@@ -0,0 +1,101 @@
1
+ import breadcrumb from './breadcrumb.hbs'
2
+ import breadcrumb2LevelData from './fixtures/breadcrumb_2_level.json'
3
+ import breadcrumb3LevelData from './fixtures/breadcrumb_3_level.json'
4
+ import breadcrumb4LevelData from './fixtures/breadcrumb_4_level.json'
5
+ import breadcrumb5LevelData from './fixtures/breadcrumb_5_level.json'
6
+
7
+ const Template = (args) => {
8
+ // You can either use a function to create DOM elements or use a plain html string!
9
+ // return `<div>${label}</div>`;
10
+ return breadcrumb({ ...args })
11
+ }
12
+
13
+ export default {
14
+ title: 'Komponenten/Navigation/Breadcrumb',
15
+
16
+ argTypes: {
17
+ _currentPageUrl: {
18
+ description: 'URL der aktuellen Seite',
19
+ control: 'text',
20
+ },
21
+
22
+ _currentPageTitle: {
23
+ control: 'text',
24
+ description: 'Titel der aktuellen Seite',
25
+ },
26
+ breadcrumbSsi: {
27
+ control: 'object',
28
+ description: 'SSI Include String aus dem Delivery',
29
+ table: {
30
+ category: 'Delivery',
31
+ },
32
+ },
33
+ showBreadcrumbTitleAlways: {
34
+ control: 'boolean',
35
+ description:
36
+ 'Hierüber wird festgelegt, ob der letzte Eintrag in der Breacrumb über alle Viewports hinweg angezeigt wird oder ob dieser mobil nicht erscheinen soll.',
37
+ table: {
38
+ category: 'Delivery',
39
+ },
40
+ },
41
+ },
42
+
43
+ parameters: {
44
+ controls: {
45
+ sort: 'alpha',
46
+ },
47
+ },
48
+ decorators: [
49
+ (Story) => {
50
+ return `
51
+ <div class="breadcrumb-container grid grid-page">
52
+ <div class="grid-cols-12 py-6 col-full sm:px-9.5 sm:col-main">
53
+ ${Story()}
54
+ </div>
55
+ </div>`
56
+ },
57
+ ],
58
+ }
59
+
60
+ export const breadcrumb2Level = {
61
+ render: Template.bind({}),
62
+ name: 'Breadcrumb 2 Level',
63
+ args: {
64
+ _currentPageUrl: '#currentPage',
65
+ _currentPageTitle: 'Kurzer Titel',
66
+ ...breadcrumb2LevelData.breadcrumb,
67
+ },
68
+ }
69
+
70
+ export const breadcrumb3Level = {
71
+ render: Template.bind({}),
72
+ name: 'Breadcrumb 3 Level',
73
+ args: {
74
+ _currentPageUrl: '#currentPage',
75
+ _currentPageTitle:
76
+ 'Korruptionsprozess: Verteidigung von Ex-Oberstaatsanwalt plädiert auf höchstens vier Jahre Haft',
77
+ ...breadcrumb3LevelData.breadcrumb,
78
+ },
79
+ }
80
+
81
+ export const breadcrumb4Level = {
82
+ render: Template.bind({}),
83
+ name: 'Breadcrumb 4 Level',
84
+ args: {
85
+ _currentPageUrl: '#currentPage',
86
+ _currentPageTitle:
87
+ 'Darmstadt 98 bleibt trotz Enttäuschung cool: "Keinen Stift in der Hose" ',
88
+ ...breadcrumb4LevelData.breadcrumb,
89
+ },
90
+ }
91
+
92
+ export const breadcrumb5Level = {
93
+ render: Template.bind({}),
94
+ name: 'Breadcrumb 5 Level',
95
+ args: {
96
+ _currentPageUrl: '#currentPage',
97
+ _currentPageTitle:
98
+ 'Verein bestätigt: Eintracht Frankfurt trennt sich im Sommer von Oliver Glasner',
99
+ ...breadcrumb5LevelData.breadcrumb,
100
+ },
101
+ }
@@ -0,0 +1,8 @@
1
+ {{~#each this.breadcrumb}}
2
+ <li class="inline">
3
+ <a href="{{this.url}}" class="{{> components/navigation/breadcrumb/utils/breadcrumb_link_classes}}">
4
+ <span>{{this.title}}</span>
5
+ </a>
6
+ <span class="ds-icon-container inline-block">{{~> components/base/image/icon _icon="arrow-right" _addClass="mx-2 w-2 h-2 text-inherit fill-link" _iconmap="icons"~}}</span>
7
+ </li>
8
+ {{/each~}}
@@ -0,0 +1 @@
1
+ {"breadcrumb":{"showBreadcrumbTitleAlways":false,"breadcrumbSsi":{"breadcrumb":[{"url":"item-1","title":"Start"}]}}}
@@ -0,0 +1 @@
1
+ {"breadcrumb":{"showBreadcrumbTitleAlways":false,"breadcrumbSsi":{"breadcrumb":[{"url":"item-1","title":"Start"},{"url":"panorama","title":"Panorama"}]}}}
@@ -0,0 +1 @@
1
+ {"breadcrumb":{"showBreadcrumbTitleAlways":false,"breadcrumbSsi":{"breadcrumb":[{"url":"item-1","title":"Start"},{"url":"sport","title":"Sport"},{"url":"darmstadt98","title":"Darmstadt 98"}]}}}
@@ -0,0 +1 @@
1
+ {"breadcrumb":{"showBreadcrumbTitleAlways":false,"breadcrumbSsi":{"breadcrumb":[{"url":"item-1","title":"Start"},{"url":"sport","title":"Sport"},{"url":"fussball","title":"Fußball"},{"url":"eintracht","title":"Eintracht Frankfurt"}]}}}
@@ -0,0 +1 @@
1
+ ds-link py-2 text-link font-copy text-xs hover:underline