hr-design-system-handlebars 1.88.0 → 1.88.2

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/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
1
+ # v1.88.2 (Fri Aug 02 2024)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - :ok_hand: Remove bug causing import from filter feature [#1038](https://github.com/mumprod/hr-design-system-handlebars/pull/1038) ([@Sunny1112358](https://github.com/Sunny1112358))
6
+
7
+ #### Authors: 1
8
+
9
+ - [@Sunny1112358](https://github.com/Sunny1112358)
10
+
11
+ ---
12
+
13
+ # v1.88.1 (Fri Aug 02 2024)
14
+
15
+ #### 🐛 Bug Fix
16
+
17
+ - DPE-3121 Monats-Übersicht im Eventkalender [#1037](https://github.com/mumprod/hr-design-system-handlebars/pull/1037) ([@Sunny1112358](https://github.com/Sunny1112358))
18
+
19
+ #### Authors: 1
20
+
21
+ - [@Sunny1112358](https://github.com/Sunny1112358)
22
+
23
+ ---
24
+
1
25
  # v1.88.0 (Thu Aug 01 2024)
2
26
 
3
27
  #### 🚀 Enhancement
@@ -1687,6 +1687,9 @@ article.indexTextDS .indexTextHighlighted .link {
1687
1687
  .w-15\/12 {
1688
1688
  width: 120%;
1689
1689
  }
1690
+ .w-16 {
1691
+ width: 4rem;
1692
+ }
1690
1693
  .w-2 {
1691
1694
  width: 0.5rem;
1692
1695
  }
@@ -1699,9 +1702,6 @@ article.indexTextDS .indexTextHighlighted .link {
1699
1702
  .w-22 {
1700
1703
  width: 5.5rem;
1701
1704
  }
1702
- .w-24 {
1703
- width: 6rem;
1704
- }
1705
1705
  .w-3 {
1706
1706
  width: 0.75rem;
1707
1707
  }
@@ -2323,6 +2323,10 @@ article.indexTextDS .indexTextHighlighted .link {
2323
2323
  --tw-bg-opacity: 1;
2324
2324
  background-color: rgba(227, 227, 227, var(--tw-bg-opacity));
2325
2325
  }
2326
+ .bg-black {
2327
+ --tw-bg-opacity: 1;
2328
+ background-color: rgba(0, 0, 0, var(--tw-bg-opacity));
2329
+ }
2326
2330
  .bg-black\/\[0\.5\] {
2327
2331
  background-color: rgba(0, 0, 0, 0.5);
2328
2332
  }
@@ -3089,6 +3093,10 @@ article.indexTextDS .indexTextHighlighted .link {
3089
3093
  color: #606060;
3090
3094
  color: var(--color-secondary-ds);
3091
3095
  }
3096
+ .text-slate-500 {
3097
+ --tw-text-opacity: 1;
3098
+ color: rgba(100, 116, 139, var(--tw-text-opacity));
3099
+ }
3092
3100
  .text-stageLink {
3093
3101
  color: #006eb7;
3094
3102
  color: var(--color-stage-link);
@@ -3319,7 +3327,7 @@ article.indexTextDS .indexTextHighlighted .link {
3319
3327
  border-bottom-color: var(--color-secondary-ds);
3320
3328
  }
3321
3329
  .counter-reset {
3322
- counter-reset: cnt1722527094501;
3330
+ counter-reset: cnt1722606294534;
3323
3331
  }
3324
3332
  .hyphens-auto {
3325
3333
  -webkit-hyphens: auto;
@@ -3727,7 +3735,7 @@ article.indexTextDS .indexTextHighlighted .link {
3727
3735
  --tw-ring-color: rgba(255, 255, 255, 0.5);
3728
3736
  }
3729
3737
  .-ordered {
3730
- counter-increment: cnt1722527094501 1;
3738
+ counter-increment: cnt1722606294534 1;
3731
3739
  }
3732
3740
  .-ordered::before {
3733
3741
  position: absolute;
@@ -3743,7 +3751,7 @@ article.indexTextDS .indexTextHighlighted .link {
3743
3751
  letter-spacing: .0125em;
3744
3752
  --tw-text-opacity: 1;
3745
3753
  color: rgba(0, 0, 0, var(--tw-text-opacity));
3746
- content: counter(cnt1722527094501);
3754
+ content: counter(cnt1722606294534);
3747
3755
  }
3748
3756
  /*! ****************************/
3749
3757
  /*! DataPolicy stuff */
@@ -22,9 +22,14 @@ const Filterer = (context) => {
22
22
  errorTargetDomNodes = hr$(`.${errorTargetClass}`, rootElement),
23
23
  errorDomNodes = hr$(`.${errorClass}`),
24
24
  contentTargetDomNode = hr$(contentTargetClass, rootElement)[0]
25
- let targetDomNodes = hr$(`.${targetClass}`, rootElement)
25
+ let targetDomNodes = hr$(`.${targetClass}`, rootElement),
26
+ currentMonth = document.getElementsByClassName('-currentMonth')[0];
27
+
28
+ const init = function () {
29
+ currentMonth.classList.add('text-white');
30
+ currentMonth.classList.add('bg-black');
31
+
26
32
 
27
- const init = function () {
28
33
  for (let i = 0; i < triggerDomNodes.length; i++) {
29
34
  triggerDomNodes[i].addEventListener('click', doSetSelectedFilter.bind(this))
30
35
  triggerDomNodes[i].addEventListener('touch', doSetSelectedFilter.bind(this))
@@ -68,9 +73,22 @@ const Filterer = (context) => {
68
73
 
69
74
  const doSetSelectedFilter = function (e, forceReset) {
70
75
  clearSelected()
71
-
76
+
77
+
78
+ let monthWrapper = e.currentTarget.closest('.js-ns-month');
79
+ let monthName = monthWrapper.querySelector('.js-monthName');
80
+
72
81
  if (!forceReset) {
73
- e.currentTarget.classList.add(navItemSelectedCssTrigger)
82
+ e.currentTarget.classList.add(navItemSelectedCssTrigger)
83
+ if (monthWrapper) {
84
+
85
+ if (monthName) {
86
+ monthName.classList.remove('text-slate-500')
87
+ monthName.classList.remove('bg-white')
88
+ monthName.classList.add('text-white');
89
+ monthName.classList.add('bg-black');
90
+ }
91
+ }
74
92
  }
75
93
 
76
94
  //hacky weil e beim start auch kein Event sein kann
@@ -82,7 +100,20 @@ const Filterer = (context) => {
82
100
  const clearSelected = function () {
83
101
  let triggerDomNodes = hr$(`.${triggerClass}.${navItemSelectedCssTrigger}`, rootElement)
84
102
 
103
+ // hacky die würde bald verändert
104
+ currentMonth.classList.remove('text-white');
105
+ currentMonth.classList.remove('bg-black');
106
+ currentMonth.classList.add('text-slate-500');
107
+ currentMonth.classList.add('bg-white');
108
+
109
+
85
110
  triggerDomNodes.forEach(function (triggerDomNode) {
111
+
112
+ // hacky die würde bald verändert
113
+ triggerDomNode.closest('.js-ns-month').firstElementChild.classList.remove('text-white');
114
+ triggerDomNode.closest('.js-ns-month').firstElementChild.classList.remove('bg-black');
115
+ triggerDomNode.closest('.js-ns-month').firstElementChild.classList.add('text-slate-500');
116
+ triggerDomNode.closest('.js-ns-month').firstElementChild.classList.add('bg-white');
86
117
  triggerDomNode.classList.remove(navItemSelectedCssTrigger)
87
118
  })
88
119
  }
@@ -9,9 +9,9 @@
9
9
  <div class="flex mb-0 overflow-x-auto overflow-y-hidden whitespace-nowrap scroll-smooth js-ns-scroll -horizontal">
10
10
  {{#each this}}
11
11
  <div class="inline-block items-center justify-center border-event-calendar-secondary border-l js-ns-month {{#if
12
- this.isCurrentMonth}} -currentMonth{{/if}}{{#if
13
12
  this.hasFutureEventsFromNow}} -selected{{else}} js-fr-reload-trigger{{/if}}">
14
- <span class="block font-heading font-bold w-24 sticky left-0 px-2 py-3">{{this.date.monthNameShort}} {{this.date.yearShort}}</span>
13
+ <span class="js-monthName block font-heading font-bold w-16 sticky left-0 px-2 py-3 {{#if
14
+ this.isCurrentMonth}} -currentMonth{{else}}text-slate-500{{/if}}">{{this.date.monthNameShort}} {{this.date.yearShort}}</span>
15
15
  <ul class="flex">
16
16
  {{#each this.days}}
17
17
  <li class="inline-block h-full group cursor-pointer js-ns-item{{#if
@@ -9,9 +9,9 @@
9
9
  <div class="flex mb-0 overflow-x-auto overflow-y-hidden whitespace-nowrap scroll-smooth js-ns-scroll -horizontal">
10
10
  {{#each this}}
11
11
  <div class="inline-block items-center justify-center border-event-calendar-secondary border-l js-ns-month {{#if
12
- this.isCurrentMonth}} -currentMonth{{/if}}{{#if
13
12
  this.hasFutureEventsFromNow}} -selected{{else}} js-fr-reload-trigger{{/if}}">
14
- <span class="block font-heading font-bold w-24 sticky left-0 px-2 py-3">{{this.date.monthNameShort}} {{this.date.yearShort}}</span>
13
+ <span class="js-monthName block font-heading font-bold w-16 sticky left-0 px-2 py-3 {{#if
14
+ this.isCurrentMonth}} -currentMonth{{else}}text-slate-500{{/if}}">{{this.date.monthNameShort}} {{this.date.yearShort}}</span>
15
15
  <ul class="flex">
16
16
  {{#each this.days}}
17
17
  <li class="inline-block h-full group cursor-pointer js-ns-item{{#if
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.88.0",
9
+ "version": "1.88.2",
10
10
  "scripts": {
11
11
  "test": "echo \"Error: no test specified\" && exit 1",
12
12
  "storybook": "storybook dev -p 6006 public",
@@ -9,9 +9,9 @@
9
9
  <div class="flex mb-0 overflow-x-auto overflow-y-hidden whitespace-nowrap scroll-smooth js-ns-scroll -horizontal">
10
10
  {{#each this}}
11
11
  <div class="inline-block items-center justify-center border-event-calendar-secondary border-l js-ns-month {{#if
12
- this.isCurrentMonth}} -currentMonth{{/if}}{{#if
13
12
  this.hasFutureEventsFromNow}} -selected{{else}} js-fr-reload-trigger{{/if}}">
14
- <span class="block font-heading font-bold w-24 sticky left-0 px-2 py-3">{{this.date.monthNameShort}} {{this.date.yearShort}}</span>
13
+ <span class="js-monthName block font-heading font-bold w-16 sticky left-0 px-2 py-3 {{#if
14
+ this.isCurrentMonth}} -currentMonth{{else}}text-slate-500{{/if}}">{{this.date.monthNameShort}} {{this.date.yearShort}}</span>
15
15
  <ul class="flex">
16
16
  {{#each this.days}}
17
17
  <li class="inline-block h-full group cursor-pointer js-ns-item{{#if
@@ -22,9 +22,14 @@ const Filterer = (context) => {
22
22
  errorTargetDomNodes = hr$(`.${errorTargetClass}`, rootElement),
23
23
  errorDomNodes = hr$(`.${errorClass}`),
24
24
  contentTargetDomNode = hr$(contentTargetClass, rootElement)[0]
25
- let targetDomNodes = hr$(`.${targetClass}`, rootElement)
25
+ let targetDomNodes = hr$(`.${targetClass}`, rootElement),
26
+ currentMonth = document.getElementsByClassName('-currentMonth')[0];
27
+
28
+ const init = function () {
29
+ currentMonth.classList.add('text-white');
30
+ currentMonth.classList.add('bg-black');
31
+
26
32
 
27
- const init = function () {
28
33
  for (let i = 0; i < triggerDomNodes.length; i++) {
29
34
  triggerDomNodes[i].addEventListener('click', doSetSelectedFilter.bind(this))
30
35
  triggerDomNodes[i].addEventListener('touch', doSetSelectedFilter.bind(this))
@@ -68,9 +73,22 @@ const Filterer = (context) => {
68
73
 
69
74
  const doSetSelectedFilter = function (e, forceReset) {
70
75
  clearSelected()
71
-
76
+
77
+
78
+ let monthWrapper = e.currentTarget.closest('.js-ns-month');
79
+ let monthName = monthWrapper.querySelector('.js-monthName');
80
+
72
81
  if (!forceReset) {
73
- e.currentTarget.classList.add(navItemSelectedCssTrigger)
82
+ e.currentTarget.classList.add(navItemSelectedCssTrigger)
83
+ if (monthWrapper) {
84
+
85
+ if (monthName) {
86
+ monthName.classList.remove('text-slate-500')
87
+ monthName.classList.remove('bg-white')
88
+ monthName.classList.add('text-white');
89
+ monthName.classList.add('bg-black');
90
+ }
91
+ }
74
92
  }
75
93
 
76
94
  //hacky weil e beim start auch kein Event sein kann
@@ -82,7 +100,20 @@ const Filterer = (context) => {
82
100
  const clearSelected = function () {
83
101
  let triggerDomNodes = hr$(`.${triggerClass}.${navItemSelectedCssTrigger}`, rootElement)
84
102
 
103
+ // hacky die würde bald verändert
104
+ currentMonth.classList.remove('text-white');
105
+ currentMonth.classList.remove('bg-black');
106
+ currentMonth.classList.add('text-slate-500');
107
+ currentMonth.classList.add('bg-white');
108
+
109
+
85
110
  triggerDomNodes.forEach(function (triggerDomNode) {
111
+
112
+ // hacky die würde bald verändert
113
+ triggerDomNode.closest('.js-ns-month').firstElementChild.classList.remove('text-white');
114
+ triggerDomNode.closest('.js-ns-month').firstElementChild.classList.remove('bg-black');
115
+ triggerDomNode.closest('.js-ns-month').firstElementChild.classList.add('text-slate-500');
116
+ triggerDomNode.closest('.js-ns-month').firstElementChild.classList.add('bg-white');
86
117
  triggerDomNode.classList.remove(navItemSelectedCssTrigger)
87
118
  })
88
119
  }