hr-design-system-handlebars 0.49.9 → 0.49.10

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.
@@ -110,8 +110,9 @@ export const parameters = {
110
110
  [
111
111
  'Page',
112
112
  'Header',
113
- ['Header', 'BrandNavigation', 'ServiceNavigation', 'SectionNavigation'],
114
- 'Flyout',
113
+ 'Teaser',
114
+ 'grid',
115
+ 'Label'
115
116
  ],
116
117
  '*',
117
118
  ],
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # v0.49.10 (Tue Jul 12 2022)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - refactoring and better component order [#268](https://github.com/mumprod/hr-design-system-handlebars/pull/268) ([@StefanVesper](https://github.com/StefanVesper))
6
+
7
+ #### Authors: 1
8
+
9
+ - SonicSoulSurfer ([@StefanVesper](https://github.com/StefanVesper))
10
+
11
+ ---
12
+
1
13
  # v0.49.9 (Fri Jul 08 2022)
2
14
 
3
15
  #### 🐛 Bug Fix
@@ -31,42 +31,39 @@ document.addEventListener('alpine:init', () => {
31
31
  },
32
32
  init(){
33
33
  let lastScrollTop = 0
34
- let height = top.innerHeight
35
-
34
+ let height = window.innerHeight
36
35
  let userScroll = false;
37
36
  window.userScroll = userScroll;
38
37
 
39
- function mouseEvent(e) {
38
+ const mouseEvent = () => {
40
39
  userScroll = true;
41
40
  window.userScroll = true;
42
- console.log('user action detected')
41
+ //console.log('user action detected')
43
42
  }
44
43
 
45
44
  const clickedOnScrollbar = mouseX => {
46
45
  return document.documentElement.offsetWidth <= mouseX ? true : false;
47
46
  }
48
47
 
49
- const mouseDownHandler = (e) => {
48
+ const mouseDownHandler = e => {
50
49
  clickedOnScrollbar(e.clientX) ? mouseEvent() : null
51
50
  };
52
51
 
53
- window.addEventListener('mousedown', mouseDownHandler, false)
54
- window.addEventListener('wheel', mouseEvent, false);
55
- window.addEventListener('touchmove', mouseEvent, false)
56
-
57
- window.addEventListener('scroll', this.debounce( () => {
52
+ const scrollHandler = () => {
58
53
  let winScroll = document.body.scrollTop || document.documentElement.scrollTop
59
54
  winScroll > lastScrollTop ? this.scrollingDown = true : this.scrollingDown = false
60
- //let height = document.documentElement.scrollHeight - document.documentElement.clientHeight
61
55
  this.percent = Math.round((winScroll / height) * 100)
62
56
  lastScrollTop = winScroll
63
- //console.log('winscroll: '+winScroll+' height: '+height + ' percent: '+ this.percent)
64
57
  this.$store.navIsVisible = !this.isNavHidden()
65
58
  this.$store.subNavIsVisible = !this.isSubNavHidden()
66
-
59
+ //console.log('winscroll: '+winScroll+' screen height: '+height + ' percent scrolled: '+ this.percent)
67
60
  //console.log('Scroll initiated by ' + (window.userScroll == true ? "user" : "browser"));
61
+ }
68
62
 
69
- },50), {passive: true})
63
+ window.addEventListener('mousedown', mouseDownHandler, false)
64
+ window.addEventListener('wheel', mouseEvent, false);
65
+ window.addEventListener('touchmove', mouseEvent, false)
66
+ window.addEventListener('scroll', this.debounce( scrollHandler,50), { passive: true })
70
67
  },
71
68
  percent: 0,
72
69
  scrollingDown: true,
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": "0.49.9",
9
+ "version": "0.49.10",
10
10
  "scripts": {
11
11
  "test": "echo \"Error: no test specified\" && exit 1",
12
12
  "storybook": "start-storybook -p 6006 public",
@@ -31,42 +31,39 @@ document.addEventListener('alpine:init', () => {
31
31
  },
32
32
  init(){
33
33
  let lastScrollTop = 0
34
- let height = top.innerHeight
35
-
34
+ let height = window.innerHeight
36
35
  let userScroll = false;
37
36
  window.userScroll = userScroll;
38
37
 
39
- function mouseEvent(e) {
38
+ const mouseEvent = () => {
40
39
  userScroll = true;
41
40
  window.userScroll = true;
42
- console.log('user action detected')
41
+ //console.log('user action detected')
43
42
  }
44
43
 
45
44
  const clickedOnScrollbar = mouseX => {
46
45
  return document.documentElement.offsetWidth <= mouseX ? true : false;
47
46
  }
48
47
 
49
- const mouseDownHandler = (e) => {
48
+ const mouseDownHandler = e => {
50
49
  clickedOnScrollbar(e.clientX) ? mouseEvent() : null
51
50
  };
52
51
 
53
- window.addEventListener('mousedown', mouseDownHandler, false)
54
- window.addEventListener('wheel', mouseEvent, false);
55
- window.addEventListener('touchmove', mouseEvent, false)
56
-
57
- window.addEventListener('scroll', this.debounce( () => {
52
+ const scrollHandler = () => {
58
53
  let winScroll = document.body.scrollTop || document.documentElement.scrollTop
59
54
  winScroll > lastScrollTop ? this.scrollingDown = true : this.scrollingDown = false
60
- //let height = document.documentElement.scrollHeight - document.documentElement.clientHeight
61
55
  this.percent = Math.round((winScroll / height) * 100)
62
56
  lastScrollTop = winScroll
63
- //console.log('winscroll: '+winScroll+' height: '+height + ' percent: '+ this.percent)
64
57
  this.$store.navIsVisible = !this.isNavHidden()
65
58
  this.$store.subNavIsVisible = !this.isSubNavHidden()
66
-
59
+ //console.log('winscroll: '+winScroll+' screen height: '+height + ' percent scrolled: '+ this.percent)
67
60
  //console.log('Scroll initiated by ' + (window.userScroll == true ? "user" : "browser"));
61
+ }
68
62
 
69
- },50), {passive: true})
63
+ window.addEventListener('mousedown', mouseDownHandler, false)
64
+ window.addEventListener('wheel', mouseEvent, false);
65
+ window.addEventListener('touchmove', mouseEvent, false)
66
+ window.addEventListener('scroll', this.debounce( scrollHandler,50), { passive: true })
70
67
  },
71
68
  percent: 0,
72
69
  scrollingDown: true,