@internetarchive/ia-topnav 1.3.1-alpha1 → 1.3.1-alpha2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@internetarchive/ia-topnav",
3
- "version": "1.3.1-alpha1",
3
+ "version": "1.3.1-alpha2",
4
4
  "description": "Top nav for Internet Archive",
5
5
  "license": "AGPL-3.0-only",
6
6
  "main": "index.js",
package/src/ia-topnav.js CHANGED
@@ -86,6 +86,13 @@ export default class IATopNav extends LitElement {
86
86
  }
87
87
  }
88
88
 
89
+ firstUpdated() {
90
+ // close open menu on `esc` click
91
+ document.addEventListener('keydown', e => {
92
+ if (e.key === 'Escape') this.closeMenus();
93
+ }, false);
94
+ }
95
+
89
96
  menuSetup() {
90
97
  this.localLinks = this.getAttribute('localLinks') !== 'false' && this.getAttribute('localLinks') !== false;
91
98
  this.username = this.getAttribute('username')
@@ -68,7 +68,7 @@ export default css`
68
68
  right: 0;
69
69
  bottom: 0;
70
70
  left: 0;
71
- z-index: 0;
71
+ z-index: 3;
72
72
  }
73
73
  #close-layer.visible {
74
74
  display: block;
@@ -76,7 +76,7 @@ export default css`
76
76
 
77
77
  .topnav {
78
78
  position: relative;
79
- z-index: 3;
79
+ z-index: 4;
80
80
  }
81
81
 
82
82
  @media (max-width: 889px) {
@@ -5,7 +5,7 @@ export default css`
5
5
  .initial,
6
6
  .closed,
7
7
  .open {
8
- right: 21.5rem;
8
+ right: 22.4rem;
9
9
  }
10
10
 
11
11
  .search-hidden.initial,
@@ -19,7 +19,7 @@ export default css`
19
19
  .initial,
20
20
  .closed,
21
21
  .open {
22
- right: 26.5rem;
22
+ right: 27.2rem;
23
23
  }
24
24
 
25
25
  .search-hidden.initial,